Select to view content in your preferred language

BasemapGallery widget, config_BasemapGallery.json, when click user-defined image nothing happens

1121
7
06-07-2017 07:57 AM
JoseSanchez
Frequent Contributor

Hello everyone, 

After adding local basemaps to Basemap Gallery (config_BasemapGallery.json), the new ones are listed in the windows  but when we click on them they do not show in the map. It looks like the link is not active.

Here is a copy of the file: config_BasemapGallery.json

{
"basemapGallery": {
"basemaps": [

{
"title": "Dark Gray Canvas",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/25869b8718c0419db87dad07de5b02d8/info/thumbnail/DGCanvasBase.png",
"layers": [
{
"id": "layer0",
"layerType": "ArcGISTiledMapServiceLayer",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Base/MapServer"
},
{
"id": "World_Dark_Gray_Reference_8618",
"layerType": "ArcGISTiledMapServiceLayer",
"url": "http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Dark_Gray_Reference/MapServer",
"visibility": true,
"opacity": 1,
"isReference": true
}
],
"spatialReference": {
"wkid": 102100
}
},
{
"title": "Imagery",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/86de95d4e0244cba80f0fa2c9403a7b2/info/thumbnail/tempimagery.jpg",
"layers": [
{
"id": "World_Imagery_2017",
"visibility": true,
"opacity": 1,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "Imagery with Labels",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/413fd05bbd7342f5991d5ec96f4f8b18/info/thumbnail/imagery_labels.jpg",
"layers": [
{
"id": "World_Imagery_6611",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"
},
{
"id": "World_Boundaries_and_Places_1145",
"isReference": true,
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServe..."
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "Light Gray Canvas",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/8b3b470883a744aeb60e5fff0a319ce7/info/thumbnail/light_gray_canvas.jpg",
"layers": [
{
"id": "World_Light_Gray_Base_1486",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer"
},
{
"id": "World_Light_Gray_Reference_8656",
"isReference": true,
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Reference/MapServer"
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "National Geographic",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/509e2d6b034246d692a461724ae2d62c/info/thumbnail/natgeo.jpg",
"layers": [
{
"id": "NatGeo_World_Map_2536",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer"
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "Oceans",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/48b8cec7ebf04b5fbdcaf70d09daff21/info/thumbnail/tempoceans.jpg",
"layers": [
{
"id": "Ocean_Basemap_2089",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Base/MapServer"
},
{
"url": "http://services.arcgisonline.com/arcgis/rest/services/Ocean/World_Ocean_Reference/MapServer",
"id": "World_Ocean_Reference_1261",
"isReference": true,
"visibility": true,
"opacity": 1
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "OpenStreetMap",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/5d2bfa736f8448b3a1708e1f6be23eed/info/thumbnail/temposm.jpg",
"layers": [
{
"visibility": true,
"opacity": 1,
"type": "OpenStreetMap"
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "Streets",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/d8855ee4d3d74413babfb0f41203b168/info/thumbnail/world_street_map.jpg",
"layers": [
{
"id": "World_Street_Map_8421",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "Terrain with Labels",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/aab054ab883c4a4094c72e949566ad40/info/thumbnail/terrain_labels.jpg",
"layers": [
{
"id": "World_Terrain_Base_3",
"layerType": "ArcGISTiledMapServiceLayer",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Terrain_Base/MapServer"
},
{
"id": "World_Reference_Overlay_5790",
"layerType": "ArcGISTiledMapServiceLayer",
"isReference": true,
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Reference_Overlay/MapServer"
}
],
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
}
},
{
"title": "Topographic",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/6e03e8c26aad4b9c92a87c1063ddb0e3/info/thumbnail/topo_map_2.jpg",
"layers": [
{
"id": "defaultBasemap",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"
}
],
"spatialReference": {
"wkid": "102100"
}
},
{
"title": "USA Topo Maps",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/931d892ac7a843d7ba29d085e0433465/info/thumbnail/usa_topo.jpg",
"layers": [
{
"id": "USA_Topo_Maps_4699",
"layerType": "ArcGISTiledMapServiceLayer",
"opacity": 1,
"visibility": true,
"url": "http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer"
}
],
"spatialReference": {
"wkid": 102100,
"latestWkid": 3857
}
},
{
"title": "USGS National Map",
"thumbnailUrl": "//[MyCompany].maps.arcgis.com/sharing/rest/content/items/6d9fa6d159ae4a1f80b9e296ed300767/info/thumbnail/national_map.jpg",
"layers": [
{
"id": "layer0",
"layerType": "ArcGISTiledMapServiceLayer",
"opacity": 1,
"visibility": true,
"url": "http://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer"
}
],
"spatialReference": {
"wkid": 102100
}
},
{
"title": "MDC Imagery 2016",
"thumbnailUrl": "${appPath}/configs/BasemapGallery/MDCImage2016.jpg",
"layers": [
{
"url": "http://[MyCompanyImagrServer].miamidade.gov/arcgis/rest/services/Pictometry2016/ImageServer"
}
],
"spatialReference": {
"wkid": 102100
}
},

0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Jose,

   Are your local base maps in WKID 102100? If they are not then if and when you use the widgets setting dialog you would have been warned that you can not have basemaps with different WKIDs

0 Kudos
JoseSanchez
Frequent Contributor

How do I check the WKID in a local base map?

Local base maps are  using the following Coordinate Systems:

  - NAD_1983_HARN_StatePlane_Florida_East_ ....  , Datum: D_North_American_1983_HARN

 - NAD_1983_2011_StatePlane_Florida_East_ ....  , Datum: D_NAD_1983_2011

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jose,

   Then those state plane base maps are not in WKID 102100. You can not use esri base maps which are web mercator and then add your State Plane local base maps to the basemap gallery. As I mentioned if you had used the widget UI to attempt to add the local basemaps you would have been warned of this.

0 Kudos
JoseSanchez
Frequent Contributor

Hi robert,

Is there a way to customize the Widget.js in "\widgets\BasemapGallery" in order to accept an image server with a different WKID?

What do we do  when we have Aerials with different Spatial Reference. 

Thanks

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jose,

   No all your basemaps have to be the same WKID. I re-project all my imagery to web Mercator to make it work with esri basemaps.

0 Kudos
JoseSanchez
Frequent Contributor

Thanks Robert,

Any recommendation to re-project  several imagery to web Mercator?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Jose,

   That is pretty basic GIS stuff. Just open ArcCatalog and go to the ArcToolbox > Data Management > Projections and Tranformations > Raster > Project Raster

0 Kudos