AnsweredAssumed Answered

Map.CenterAndZoom Issue

Question asked by NikWach on Mar 6, 2014
Latest reply on Dec 3, 2015 by Jacqueline.Brost_MNDNR
Good day,

I cannot get a center and zooming funktion in my JS-Viewer. Hier is the code:

function DrawPointAndZoom() {
        try {

            var mylat = 29.818008;
            var mylong = 5.423178;
            var latLongPoint = new esri.geometry.Point(mylat, mylong, new esri.SpatialReference({ wkid: 4326 }));
            var mercator = esri.geometry.geographicToWebMercator(latLongPoint);
            map.centerAndZoom(mercator, 10)
        }
        catch (err) {
            alert(err);
        }
}

I get an error:    TypeError: map.centerAndZoom is not a function

What can be the problem?

Outcomes