Try this:
function zoomto() {
map.set('zoom', parseInt(prompt('zoom value')));
}
Question
Hi I am trying to create a function where I ask the user to input the zoom value that he wants the map to zoom in but it seems that this is not working. Any advice on it ? Thanks.
function zoomto()
{
map.SetOptions({zoom: parseInt(prompt('zoom value'))});
}
and here is my button
<input type="button" id="zoomto" value="zoom" onclick="zoomto()"/>
Solution
Try this:
function zoomto() {
map.set('zoom', parseInt(prompt('zoom value')));
}