😮 Doh! Note to self - when re-using code from Esri examples and other places, make sure you don't call stuff twice.I'd re-used some older code wit a scale bar, but had stripped out the initial definition, so it didn't work, then added the whole lot back in - result 2 bars, one metric the other "american" - Note to Esri, here in England we are trying very hard to use metric 😄
dojo.connect(map, 'onLoad', function(theMap) { var scalebar = new esri.dijit.Scalebar({ map: map, scalebarUnit:'metric' }); //resize the map when the browser resizes dojo.connect(dijit.byId('map'), 'resize', map,map.resize); //add the overview map overviewMapDijit = new esri.dijit.OverviewMap({ map: map, expandFactor:4 }, dojo.byId('overviewMapDiv')); overviewMapDijit.startup(); });
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.