How would I customize a map tool so as to be able to enter x,y coordinates manually to create an object such as a point and zoom to it?
I have the simple code below:
on(dom.byId("btnFindCoordinates"), "click", function() {
map.graphics.clear();
var x = dom.byId("xCoord").value;
var y = dom.byId("yCoord").value;
var coordPoint = new Point(x,y);
prjParams.geometries = [coordPoint];
map.centerAndZoom(coordPoint, 11);
map.graphics.add(new Graphic(coordPoint, markerSymbol));
});
But not sure how I would add this into the map, I am aware that I want to write a .js file like the attached in order to work with our cityworks map! I highly appreciate if someone can help me to write the code above similar to the attached in order to add it the our map.
Thank you in advance
Best
Majdoleen