Update GeoJSONLayer URL parameter and refresh

940
1
Jump to solution
02-22-2022 01:41 PM
ArnauForner
New Contributor II

Hello

Is it possible to change the URL property of a GeoJSONLayer and .refresh(), so that it fetches a new set of data, overwrites the previous one and displays it on the map?

I need a different URL, not just a different query string, which I know it is possible by using .createQuery()  .queryFeatures().

Thanks

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

This cannot be done and goes for all layers. You'd have to create a new instance of GeoJSONLayer for each unique URLs. 

View solution in original post

1 Reply
UndralBatsukh
Esri Regular Contributor

Hi there, 

This cannot be done and goes for all layers. You'd have to create a new instance of GeoJSONLayer for each unique URLs.