I have an application using the arcgisUtils.createMap method. In the application, properly formatted WebMapJson is passed into the createMap() method and a working map is returned. However, I have a problem with the returned map when accessing the map.basemapLayerIds property or using map.getBasemap() and map.setBasemap(). Basically, in the response map the basemapLayerIds property is null, which affects the getBasemap() and setBasemap() methods.
Further, if I do call the map.setBasemap() method a second basemap will get added to the map underneath the original basemap that was uspplied in the JSON.
This Esri JS API sample has the same issue from what I can tell. Run this sample in debug mode and put a breakpoint before the legend is started (or change the map to a global variable) and test the basemapLayerId property and getBasemap() method.
Is this an oversight in the JS API?
In the meantime, to get around this issue, I'm just traversing the WebMapJson in my code and if the baseMapLayers array is populated then I am manually populating the response Map's basemapLayerIds array.
Any insight is much appreciated!
its definitely a bug. don't quote me, but i heard that basemap handling is improved in 4.x (due out for beta release next month). if you want/need an official tracking number, you'd have to log a ticket with technical support (and reference this thread) so that they can export something public.
also, my apologies for never getting back to you on the other DotDensityRenderer thing we chatted about. at first pass looking at your repro case that looked like a bug to me too, but it would be helpful if you could pass it on to tech support as well for them to take a deeper look.
Cool, I just didn't want to let this slide since it seemed like a legit oversight (regarding the basemaps).
I will follow up with support on the DotDensity issue. We actually have a very simple work around in place for that, but wanted to let you guys know since what is documented in the API does not appear to work.
Thanks again for the info and the quick reply!