saikishore

Zoom in on click of an icon on the map

Discussion created by saikishore on Mar 10, 2013
Latest reply on Mar 11, 2013 by saikishore
I have a map rendered and have used some custom icons dropped on the map. Can i know what needs to be done onclick of the icon so that map zooms in at particular location and drops few more icons (have written the code for dropping the icons)?  Need the code just to find out the onclick of an icon. Need a listner for onclick of a dropped icon on the map.

My Code:-
plotAddressId= function plotAddressId(addressId, state) {
           addressIdQuery = new esri.tasks.Query();
            addressIdQuery.returnGeometry = true;
            addressIdQuery.where = "ADDRESS_KEY = '" + state + addressId + "'";
            addressIdQueryTask.execute(addressIdQuery, function(results) {
              var geom = results.features[0].geometry;
              var graphic = new esri.Graphic(geom, locationSymbol);
              locationGraphicsLayer.add(graphic);
              zoomToLocations();
            });
          }

Outcomes