Is there a way to let the viewer see scale text (i. e. "1:1000") instead of just a scale bar in ArcGIS Online maps? We are using the Basic Viewer template with some minor modifications. We would want to use metres as the unit, if possible.Even better: is there a way to let users choose a scale by selecting from a drop-down menu, or typing the numbers?Any hints are appreciated 🙂Thanks, Turid
<input id="scale" onkeypress="keyPress(event)" onChange="map.setExtent(esri.geometry.getExtentForScale(map, this.value.replace('.', '')));"/> function keyPress(e) { if (e.keyCode == 13) { dojo.byId("scale").blur(); } }
add this and you have all in the same textbox:
mmh sorry I don't understant your problem... can you explain it better please?
I pasted that into a text box and it shows what i pasted as the text
function showScale() { dojo.byId("scale").value = dojo.number.format(map.getScale(), { pattern:"##,##0"});} dojo.connect(map, "onZoomEnd", showScale);
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.