2

I am looking for a way to add a georeferenced image file to a map in the ESRI 4.x Javascript api. In the 3.x version this was possible through the addImage method on MapImageLayer. It looked like:

mapImageLayer.addImage(new MapImage({ extent : extentForDataUrl, href : someDataUrlString }));

In reading the docs for the 4.2 MapImage they state “The MapImage class can also be used to create a geo-referenced image file for use with the MapImageLayer” but I cannot find how this is done. The addImage method on MapImageLayer appears to be gone and its constructor requires a portal item id or a service url.

The images that I want to add to the map reflect radar/meteorology data that is updated every couple of minutes.

  • I'm running into this same issue attempting to add georeferenced files. After talking with ESRI technical support they are saying that this is a 'new feature' and are treating it as an enhancement with no time frame on implementation. They suggested trying to use the GraphicsLayer instead, which doesn't appear to be able to do this either on first glance. Were you ever able to find a work-around for this? – mtCoder Mar 6 '17 at 20:20
  • This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. You can also add a bounty to draw more attention to this question once you have enough reputation. - From Review – Oto Kaláb Mar 6 '17 at 21:07
  • I have not found a work around for this issue and am still using 3.x on my current project. – EricAZ Mar 8 '17 at 18:58
1

The 4.x JSAPI doesn't yet support adding georeferenced images. The documentation for MapImage is incorrect (and we will update that).

Note also that in 4.x the ArcGIS* layers have shorter, clearer module names, e.g., the old ArcGISTiledMapServiceLayer is now TileLayer and ArcGISDynamicMapServiceLayer is now MapImageLayer. The old "MapImageLayer" will be renamed to something else once it's added to the 4.x API.

https://developers.arcgis.com/javascript/latest/guide/functionality-matrix/index.html https://developers.arcgis.com/javascript/latest/guide/migrating/index.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.