<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=7, IE=9, IE=10"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title>ArcGIS API for JavaScript | Simple Geocoding</title> <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4/js/esri/css/esri.css"> <script src="http://serverapi.arcgisonline.com/jsapi/arcgis/3.4"></script> <script> require(["esri/map", "dojo/on", "dojo/dom", "dojo/domReady!"], function(Map,on, dom,domReady) { // Create map var map = new Map("mapDiv",{ basemap: "gray", center: [-122.69, 45.52], zoom: 3 }); //utils.autoRecenter(map); on(dom.byId("btnStreets"),"click", function() { map.setBasemap("streets"); }); on(dom.byId("btnSatellite"),"click", function() { map.setBasemap("satellite"); }); on(dom.byId("btnHybrid"),"click", function() { map.setBasemap("hybrid"); }); on(dom.byId("btnTopo"),"click", function() { map.setBasemap("topo"); }); on(dom.byId("btnGray"),"click", function() { map.setBasemap("gray"); }); on(dom.byId("btnNatGeo"),"click", function() { map.setBasemap("osm"); }); } ); </script> </head> <body> <button id="btnStreets" type="button" >Streets</button> <button id="btnSatellite" type="button">Satellite</button> <button id="btnHybrid" type="button">Hybrid</button> <button id="btnTopo" type="button">Topo</button> <button id="btnNatGeo" type="button">Nat Geo</button> <div id="mapDiv"></div> </body> </html>
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.