I am getting the error "The basemap you are adding has a different spatial reference from the current map." when trying to add a custom basemap (NOAA Nautical Charts) to the Basemap Gallery widget. I was able to add this basemap to an app in a previous version of the WAB and the basemap does still work. But when I edit that existing app, I get that same error.
Was there a bug introduced in the March update?
Solved! Go to Solution.
Hi Ken,
It looks like a bug has now been logged through support for this issue as well. The bug number is BUG-000104277.
Best,
Caroline
Ken,
It is definitely a bug introduced. It is checking for the same tiling scheme and because the ImageServer service is not cached it fails that test. Here is the fix for that code it goes in the Edit.js under BaseMapGallery\setting\Setting.js
_onServiceFetch: function(urlDijit, evt) {
var result = false;
var errorMessage = null;
var url = evt.url.replace(/\/*$/g, '');
var wider = (this.map.width > this.map.height) ? this.map.width : this.map.height;
if (this._isStringEndWith(url, '/MapServer') ||
this._isStringEndWith(url, '/ImageServer')) {
var curMapSpatialRefObj = this.map.spatialReference;
var basemapSpatialRefObj = evt.data.spatialReference ||
evt.data.extent.spatialReference ||
evt.data.initialExtent.spatialReference ||
evt.data.fullExtent.spatialReference;
console.info(SRUtils.isSameSR(curMapSpatialRefObj.wkid, basemapSpatialRefObj.wkid))
if (curMapSpatialRefObj &&
basemapSpatialRefObj &&
SRUtils.isSameSR(curMapSpatialRefObj.wkid, basemapSpatialRefObj.wkid)) {
//now check if the service even has tileInfo if not proceed or if it equals then proceed
if(!evt.data.tileInfo || utils.tilingSchemeCompatible(this.map.__tileInfo, evt.data.tileInfo, wider)){
urlDijit.proceedValue = true;
result = true;
}
} else {
urlDijit.proceedValue = false;
result = false;
errorMessage = this.nls.invalidBasemapUrl2;
}
} else {
urlDijit.proceedValue = false;
result = false;
errorMessage = this.nls.invalidBasemapUrl1;
}
this._checkProceed(errorMessage);
return result;
},
Thanks for this code, Robert Scheitlin, GISP. However, this is the for the Online version, not the Developer version. I've put in a call to support about this and referenced your code.
Here's the workaround in the meantime:
1. ArcGIS.com > My Content > Add Item from web > paste https://seamlessrnc.nauticalcharts.noaa.gov/arcgis/rest/services/RNC/NOAA_RNC/ImageServer
2. Add item to map and save as a webmap
3. Create a custom basemap group and share that item and webmap to that group
4. In My Organization > Edit Settings > Map > Basemap Gallery > point to the custom basemap group.
- This will make the map as part of the default basemap gallery.
5. In WAB > Widget > Basemap > check on 'Always synchronize with the Basemap Gallery setting of the Organization'
6. In App in WAB > Basemap Widget > Can see and choose the NOAA_RNC as the basemap.
Thank you Robert. I have created an issue for this bug. And it will be fixed in next online update.
Do you have a bug number for this? I have submitted an incident for the Online issue (#01909850), but no bug has been attached to it.
Sorry, there is no bug number for this. I created an issue in our code repository, the issue number is #9044. But I think it has no use for you.
Hi Ken,
It looks like a bug has now been logged through support for this issue as well. The bug number is BUG-000104277.
Best,
Caroline
This bug has been marked as Implemented for ArcGIS Online Version 5.2
What is the status of this, I am having the same issue trying to add an image service service into a custom basemap group. I initially received that same error message, I then proceeded to follow these steps (option 2):
https://support.esri.com/en/bugs/nimbus/QlVHLTAwMDEwNDI3Nw==
I am now able to see the basemap I want in the web app builder basemap widget, however when I click on it the basemap doesn't load. No error messages, just nothing happens. All my other basemaps load with no issues.
This defect was marked as fixed at ArcGIS Online 5.2. However, we may be running into a different issue. If you are able, I would recommend calling into Technical Support and creating a case with our ArcGIS Online team.