JS API 4.x: add Levels of Detail to MapView?

1036
2
06-30-2020 10:53 AM
Egge-Jan_Pollé
MVP Regular Contributor

Dear community, Hi all,

Is it possible to add Levels of Detail (LODs) to a MapView, using the ArcGIS API for JavaScript 4.x?

I have created a little map showing aerial imagery of the Dutch railway network: https://twiav.nl/cursus/arcgis/javascript/cursus_arcgis_javascript_wmslayer_toevoegen.htm?x=135908&y...(it will not be possible to zoom in any further from this point...)

The max zoom level in this map is 16. This is decided for by the basemap used (in this case: https://www.arcgis.com/home/item.html?id=7aea6fa913a94176a1074edb40690318 ).

The quality of the imagery, however, would allow zooming in a little further into the assets along the railroad track, i.e. a level 17, 18, 19, 20 and 21 would be welcome. So, the questions is: how to add these additional LODs manually, if possible?

In comparison: I have created a similar map (using Leaflet) where I managed to add these additional levels irrespective of the limitations given by the basemaps used: https://twiav.nl/nl/luchtfoto_prorail.php#19/52.09136/5.10865 (this is more or less the same location, but now at zoom level 19, with 2 more levels to zoom in still available).

Any insights?

Thanks in advance.

Egge-Jan

Tags (1)
0 Kudos
2 Replies
StephenSporik1
New Contributor

I was abled to add custom LODs using the MapView 'constraint' property.   The LODs[] can be autocast using JSON similar to what is found for lod property in the REST API for a basemap service.  

https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#constraints

view.constraints = {
lods: [
{
level: 0,
resolution: 156543.03392800014,
scale: 5.91657527591555E8
},
{
level: 1,
resolution: 78271.51696399994,
scale: 2.95828763795777E8
} ......

]};

0 Kudos
manariietches
New Contributor

Hi all,

How do we set LOD's specifically for Feature Layers?

Thanks in advance

 

0 Kudos