AnsweredAssumed Answered

Disappearing features when no basemap used

Question asked by lukasr on Nov 12, 2016
Latest reply on Nov 13, 2016 by rscheitlin

I am trying to load a map without the standard ESRI basemap. I have an Arcgis server 10.3 service with 2 feature layers. In API 3.18 I simply created empty map and added those layers as FeatureLayers or as one ArcGISDynamiMapServiceLayer.

I have converted this code to 4.1 – added the MapView and again used either the FeatureLayer or this time the MapImageLayer.  In 3.18 the map shows fine, but in 4.1 I am getting a very strange behavior – only the features that overlap with the center of the map are showing – if I pan left or right some of them disappear and others show (again only those that “touch” imaginary vertical line going through the center of the map).

 

The layers are using UTM coordinate system. I tried setting the spatialReference on the MapVIew too but there is no difference. I have also experimented with extent of the Mapview.

I tried also creating my own Basemap with the same 2 layers and adding them to map – but again I observed the same behavior. Not sure if a basemap should be created from FeatureLayers (the documentation says basemap can be only created from tiled services) - nevertheless the map has shown.

(Checked different browsers too).

 

If I use any esri standard basemap (e.g. streets) and then add my layers everything works fine, so I assume it has something to do with the initial settings of the map object (or mapView) inheriting spatialReference, zoom level etc.. from my layers.

 

Another problem I noticed is that when I create an empty map and add it to mapView then panning or zooming throws javascript error (not sure this is intentional behavior, but I think it could be linked to the same problem).

 

Can anyone please post a working sample code of loading a simple map with the MapImageLayer and without any basemap.

 

Thanks in advance for any suggestions

Outcomes