Solved! Go to Solution.
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(); } }
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(); } }
function showScale() {
dojo.byId("scale").value = dojo.number.format(map.getScale(), { pattern:"##,##0"});
}
dojo.connect(map, "onZoomEnd", showScale);
add this and you have all in the same textbox:
I pasted that into a text box and it shows what i pasted as the text
mmh sorry I don't understant your problem... can you explain it better please?
add this and you have all in the same textbox: