Issues when loading Custom Base Map

2704
2
02-01-2019 01:25 AM
SachithSilva
New Contributor

Hi,

I got  below  two console error in my browser   respectively when loading custom base maps.

error 1:

[esri.views.2d.layers.TileLayerView2D] #resolve() Failed to resolve layer view (layer title: 'layer title', id: 'layer id')

name: "layerview:spatial-reference-incompatible", message: "The spatial reference of this layer does not meet the requirements of the view".

error 2:

[esri.views.LayerViewFactory] Failed to create view for layer 'Layerame , id 'layer id' of type tile

name: "layerview:spatial-reference-incompatible", message: "The spatial reference of this layer does not meet the requirements of the view".

tricky part is all the custom base map  loading fine when reload the page by 'Empty cache and hard reload 'it works fine  and custom base map load smoothly without above errors.

 Does anybody   why this happen ?  

Thank you in advance .

Additionally   : I am using  Arcgis JavaScript  api 4.10  and use TileLayer to load custom basemap.

 

2 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Sachith,

  So the requirements are for all basemaps to be the same WKID and cached at the same LODs (scales). Does your custom basemap meet those requirements?

HezronPhilip
New Contributor II

Hi,

As far as the conditional working of the loading is concerned, I assume that you are loading two or more layers within the basemap, you can check the network console to see which one loads first in the working scenario after a hard reload and make sure that the particular layer always loads first by tinkering with the code.

However, this is just a workaround and you have to ensure that the layers have the same spatial reference for optimal performance.

0 Kudos