Select to view content in your preferred language

Add GeoJSON Layers to a WebMap object

431
1
Jump to solution
11-16-2023 11:58 AM
DeniseVachon
Occasional Contributor

Hello! I'm wondering if it's possible to add a GeoJSONLayer (GeoJSONLayer | API Reference | ArcGIS Maps SDK for JavaScript 4.28 | ArcGIS Developers) to a WebMap object? WebMap | API Reference | ArcGIS Maps SDK for JavaScript 4.28 | ArcGIS Developers

This is my use-case:

Build and maintain a web map in ArcGIS Online that contains a series of relevant contextual layers. Reference that web map directly in a series of JS applications, but have the flexibility to programmatically add additional layers to the map view as needed within my custom JS applications.

Is this doable? Thanks for any advice!

1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

I think you are asking if a GeoJSONLayer can be persisted in a webmap. It can and this support was added at version 4.22 - https://developers.arcgis.com/javascript/latest/4.22/#better-support-for-csvlayer-and-geojsonlayer

 

View solution in original post

0 Kudos
1 Reply
UndralBatsukh
Esri Regular Contributor

Hi there, 

I think you are asking if a GeoJSONLayer can be persisted in a webmap. It can and this support was added at version 4.22 - https://developers.arcgis.com/javascript/latest/4.22/#better-support-for-csvlayer-and-geojsonlayer

 

0 Kudos