AnsweredAssumed Answered

centerAndZoom() Zooms all the way out

Question asked by rozumed on Apr 25, 2013
Latest reply on Apr 25, 2013 by JGravois-esristaff
Using the  3.3 compact javascript library, I have had an issue using center and zoom when my basemap is dynamic. When it is cached, it seems to work correctly. Has anyone seen this before?

var symbol = new esri.symbol.PictureMarkerSymbol('css/images/Pin.png', 32, 32);
    var point = esri.geometry.geographicToWebMercator(new esri.geometry.Point(attributes.long, attributes.lat));
    var graphic = new esri.Graphic(point, symbol, attributes, infoTemplate);

    //Add to map and zoom
    map.graphics.add(graphic);
    map.centerAndZoom(point, 9);
    map.infoWindow.setFeatures([graphic]);

Outcomes