POST
|
I'm having a beast of a time getting some custom base maps to work with ArcGIS online and the web appbuilder. I've followed the instructions here to make a single layer basemap and add it to my organization's defaults. https://enterprise.arcgis.com/en/portal/latest/administer/windows/customize-basemaps.htm (also similar examples from here: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/living-atlas-custom-basemap-gallery/ & https://www.esri.com/arcgis-blog/products/arcgis-living-atlas/mapping/combining-esri-default-raster-basemaps-with-vector-basemaps/) The maps show up fine in the online map. When I bring them into web appbuilder as the default map, they show up no problem. The issue is if I add the map to the Basemap widget and pick another of the maps as a basemap, it fails to load. When I look at the developer console, I get the following. TypeError: Cannot read property 'trim' of undefined at Object.h.trim (init.js:66) at Object.a.fixUrl (init.js:755) at A (init.js:1007) at Object._getServiceInfo (Widget.js?wab_dv=2.21:42) at Object._addReferenceLayer (Widget.js?wab_dv=2.21:39) at Object._updateReferenceLayer (Widget.js?wab_dv=2.21:39) at Object.<anonymous> (Widget.js?wab_dv=2.21:26) at init.js:65 at e (init.js:105) at f (init.js:105) "TypeError: Cannot read property 'trim' of undefined\n at Object.h.trim (https://js.arcgis.com/3.37/init.js:66:431)\n at Object.a.fixUrl (https://js.arcgis.com/3.37/init.js:755:266)\n at A (https://js.arcgis.com/3.37/init.js:1007:135)\n at Object._getServiceInfo (https://911district.maps.arcgis.com/apps/webappbuilder/stemapp/widgets/BasemapGallery/Widget.js?wab_dv=2.21:42:65)\n at Object._addReferenceLayer (https://911district.maps.arcgis.com/apps/webappbuilder/stemapp/widgets/BasemapGallery/Widget.js?wab_dv=2.21:39:392)\n at Object._updateReferenceLayer (https://911district.maps.arcgis.com/apps/webappbuilder/stemapp/widgets/BasemapGallery/Widget.js?wab_dv=2.21:39:56)\n at Object.<anonymous> (https://911district.maps.arcgis.com/apps/webappbuilder/stemapp/widgets/BasemapGallery/Widget.js?wab_dv=2.21:26:355)\n at https://js.arcgis.com/3.37/init.js:65:128\n at e (https://js.arcgis.com/3.37/init.js:105:393)\n at f (https://js.arcgis.com/3.37/init.js:105:182)" r @ init.js:116 I get the same problem when I try to use the developer edition of Web AppBuilder, but I've been able to work around this by editing the config_widgets_BasemapGallery_Widget.json files. By Default when I select my organization base maps, the .json looks like this: { "thumbnailUrl": "${appPath}/configs/BasemapGallery/base64Img_widgets_BasemapGallery_Widget_36_1629220158426.png", "title": "BaseMap Test - Single Layer", "layers": [ { "id": "VectorTile_1970", "title": "Light Gray Base", "layerType": "VectorTileLayer", "maxScale": 70.531074, "styleUrl": "https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json" }, { "id": "17b54d14f5f-layer-2", "title": "Smith County Grayscale", "itemId": "b4ece6210e7f4a3da3c8a23362c47d06", "layerType": "VectorTileLayer", "minScale": 597012.646703, "maxScale": 70.531074, "styleUrl": "https://tiles.arcgis.com/tiles/KgTmADyzXWOLUPKd/arcgis/rest/services/Smith_County_Grayscale/VectorTileServer/resources/styles/root.json" }, { "id": "VectorTile_7117", "title": "Light Gray Reference", "visibility": false, "layerType": "VectorTileLayer", "maxScale": 70.531074, "styleUrl": "https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json", "isReference": true } ], "spatialReference": { "latestWkid": 3857, "wkid": 102100 } }, { "thumbnailUrl": "${appPath}/configs/BasemapGallery/base64Img_widgets_BasemapGallery_Widget_36_1629220158427.png", "title": "Smith County 2020 Aerial with Labels", "layers": [ { "id": "VectorTile_1970", "title": "Light Gray Base", "layerType": "VectorTileLayer", "styleUrl": "https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json" }, { "id": "17b550b0798-layer-61", "title": "AerialOnly2020", "url": "https://www.smithcountymapsite.org/publicgis/rest/services/Basemaps/AerialOnly2020/MapServer", "layerType": "ArcGISMapServiceLayer" }, { "id": "17b40949c0d-layer-49", "title": "Smith County Aerial Overlay", "itemId": "c2bd20b1298a4defbba4e4ddfc9d619e", "layerType": "VectorTileLayer", "maxScale": 70.531074, "styleUrl": "https://tiles.arcgis.com/tiles/KgTmADyzXWOLUPKd/arcgis/rest/services/Smith_County_Aerial_Overlay/VectorTileServer/resources/styles/root.json" }, { "id": "VectorTile_7117", "title": "Light Gray Reference", "layerType": "VectorTileLayer", "styleUrl": "https://cdn.arcgis.com/sharing/rest/content/items/1768e8369a214dfab4e2167d5c5f2454/resources/styles/root.json", "isReference": true } ], "spatialReference": { "latestWkid": 3857, "wkid": 102100 } } But if I edit it like this, everything works fine in the developer edition of web appbuilder. "basemaps": [ { "title": "Smith County - Grayscale", "thumbnailUrl": "${appPath}/configs/BasemapGallery/base64Img_widgets_BasemapGallery_Widget_36_1629217571837.png", "layers": [ { "id": "VectorTile_2846", "layerType": "VectorTileLayer", "opacity": 1, "styleUrl": "https://tiles.arcgis.com/tiles/KgTmADyzXWOLUPKd/arcgis/rest/services/Smith_County_Grayscale/VectorTileServer/resources/styles/root.json", "title": "Smith County - Grayscale", "type": "VectorTileLayer", "visibility": true }, { "id": "VectorTile_1970", "layerType": "VectorTileLayer", "opacity": 1, "styleUrl": "https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json", "title": "Light Gray Base", "type": "VectorTileLayer", "visibility": true }, { "id": "VectorTile_1645", "isReference": true, "layerType": "VectorTileLayer", "opacity": 1, "styleUrl": "https://tiles.arcgis.com/tiles/KgTmADyzXWOLUPKd/arcgis/rest/services/Smith_County_Grayscale/VectorTileServer/resources/styles/root.json", "title": "Dark Gray Reference", "type": "VectorTileLayer", "visibility": true } ], "spatialReference": { "wkid": "102100" } }, { "title": "Smith County - 2020 Aerial Overlay", "thumbnailUrl": "${appPath}/configs/BasemapGallery/base64Img_widgets_BasemapGallery_Widget_36_1629217571838.png", "layers": [ { "id": "VectorTile_1970", "layerType": "VectorTileLayer", "opacity": 1, "styleUrl": "https://cdn.arcgis.com/sharing/rest/content/items/291da5eab3a0412593b66d384379f89f/resources/styles/root.json", "title": "Light Gray Base", "type": "VectorTileLayer", "visibility": true }, { "id": "TiledLayer_Aerial2020_0001", "title": "Aerial - 2020", "url": "https://www.smithcountymapsite.org/publicgis/rest/services/Basemaps/AerialOnly2020/MapServer", "layerType": "ArcGISMapServiceLayer" }, { "id": "VectorTile_2846", "layerType": "VectorTileLayer", "opacity": 1, "styleUrl": "https://tiles.arcgis.com/tiles/KgTmADyzXWOLUPKd/arcgis/rest/services/Smith_County_Aerial_Overlay/VectorTileServer/resources/styles/root.json", "title": "Smith County Aerial Overlay", "type": "VectorTileLayer", "visibility": true } ], "spatialReference": { "wkid": "102100" } }, Has anyone encountered this before? Have I done something wrong in creating the organization base maps? Any help is appreciated. Thanks,
... View more
08-17-2021
10:18 AM
|
0
|
1
|
982
|
POST
|
I ran into this exact same problem today. I wound up deleting the old hosted geodatabase and hosted feature service in arcgis online and republishing the file, updating my script with the new item id, and it miraculously started working again.
... View more
07-22-2021
09:43 AM
|
1
|
0
|
1072
|
POST
|
I've uploaded a very simple file geodatabase with a single polygon layer to ArcGIS online and created a hosted feature service from it. I'm now trying to use DI / FME to update the service. I've connected my reader/writer without any problem, but whenever I try to run the tool it throws the following error: Reproject: Could not reproject the geometry of the preceding feature: Reprojector: Invalid reprojection parameters I've added in an EsriReprojector Transformer, specified the source coordinate system (WKID 2276) and the target coordinate system, (WKID 102100) but it still throws the error. I've tried using every geographic transformation option listed, I've tried deleting the EsriReprojector and using just the Basic Reprojector with the same results. I simply can not get this to work. What am I missing here?
... View more
04-06-2020
08:44 AM
|
0
|
1
|
739
|
Title | Kudos | Posted |
---|---|---|
1 | 07-22-2021 09:43 AM |
Online Status |
Offline
|
Date Last Visited |
03-15-2022
03:03 PM
|