Why is ‘toggle basemap’ widget for satellite view no longer working with OS basemaps?

947
6
Jump to solution
07-04-2020 02:49 AM
TimJackson1
New Contributor II

These two apps both include a ‘toggle basemap’ widget at bottom RH for a satellite view. 

It works fine in #1 (and Esri default basemaps).  #2 was working until recently, but not any more. 

Any ideas on a solution?

#1 using OpenStreetMap

#2 using OS Open Raster

0 Kudos
1 Solution

Accepted Solutions
Egge-Jan_Pollé
MVP Regular Contributor

Hi Tim Jackson,

That's what the GeoNet Community is there for: to help 🙂

And it is always good to just try something out: trial-and-error, learning-by-doing, that's the way forward 🙂

So, in the end my first answer seemed to be right, didn't it?

You may close the call by marking the answer as correct. There are many questions on this forum which remain open, even though a correct answer has been given.

Cheers,

Egge-Jan

View solution in original post

6 Replies
Egge-Jan_Pollé
MVP Regular Contributor

Hi Tim Jackson,

In the second app, the one with the Ordnance Survey layer, an error message pops up in the console: "The spatial reference of this layer does not meet the requirements of the view" (see screen capture attached)

I guess the OS layer is in British National Grid (EPSG:27700), whereas the satellite layer is not.

Did you previously point to an OS layer in Web Mercator?

HTH,

Egge-Jan

TimJackson1
New Contributor II

Egge-Jan,

Thanks for your response.

Yes, I use this premium OS raster stack basemap, using Spherical Mercator (SPM), EPSG: 3857 (see image insert below).

The toggle widget has previously worked OK in all my apps using this premium OS basemap, and still does in apps created before June (approx). The widget does not work in apps created more recently. My guess is there’s been some AGOL update/change, which is causing this issue?

Does that help?

rgds, Tim

0 Kudos
Egge-Jan_Pollé
MVP Regular Contributor

Hi Tim Jackson,

Yeah, that's what you have indicated already in your initial post, that everything has been working fine until very recently. Hmmm, something somewhere must have changed between the moment it did still work and the moment it didn't any longer... And now the trick would be to identify that change. (Please note: I am not from Esri. Just a fellow Esri user trying to help :-))

  • Did you change the code of your app recently?
  • Another thing I noted: you are using version 4.16 of the JS API: <script src="https://js.arcgis.com/4.16/"></script>. This version has not yet officially been released. Current version is 4.15

Hope you will find a solution. Please let us know when you do.

BR,

Egge-Jan

0 Kudos
TimJackson1
New Contributor II

Egge-Jan,

Thanks for your response.

Yes, I use this premium OS raster stack basemap, using Spherical Mercator (SPM), EPSG: 3857 (see image insert below).

The toggle widget has previously worked OK in all my apps using this premium OS basemap, and still does in apps created before June (approx). The widget does not work in apps created more recently. My guess is there’s been some AGOL update/change, which is causing this issue?

Does that help?

rgds, Tim

0 Kudos
TimJackson1
New Contributor II

Egge-Jan

 

Thanks a lot for your help.  I’m a GIS novice, so still on the learning curve.  Anyway, I’ve found the reason for the coordinate conflict problem, and now fixed it.  I had created new app content based on an old webmap using BNG.

 

rgds, Tim

Egge-Jan_Pollé
MVP Regular Contributor

Hi Tim Jackson,

That's what the GeoNet Community is there for: to help 🙂

And it is always good to just try something out: trial-and-error, learning-by-doing, that's the way forward 🙂

So, in the end my first answer seemed to be right, didn't it?

You may close the call by marking the answer as correct. There are many questions on this forum which remain open, even though a correct answer has been given.

Cheers,

Egge-Jan