AnsweredAssumed Answered

Custom Home Button In ArcGIS API for Javascript

Question asked by BEHSEINI on Sep 2, 2015
Latest reply on Sep 2, 2015 by BEHSEINI

Can you please take a look at This Demo and let me know how I can set up a custom home button


        var map;
        require(["esri/map", "esri/geometry/Point",
        "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol",
        "esri/graphic", "dojo/dom","dojo/on", "dojo/domReady!"], function (Map, Point,
        SimpleMarkerSymbol, SimpleLineSymbol,
        Graphic, dom, on) {
                map = new Map("map", {
                center: [0, 0],
                zoom: 5,
                basemap: "topo",
                slider: false, // set to false to remove default zoom buttons
                spatialReference: { wkid: 4326 }
            on(dom.byId("zoomInBtn"), "click", function(evt){map.setZoom(map.getZoom()+1);});
            on(dom.byId("zoomOutBtn"), "click", function(evt){map.setZoom(map.getZoom()-1);});
            on(dom.byId("goHome"), "click", function(evt){});