hi steve,i've attached a zip file of both legacy and AMD versions of 3 different applications that are a little more complicated than I used for my blog. hope you find reviewing them helpful.
I figured out the problem "dijit/layout/TabContainer", "esri.dijit.Bookmarks", "esri.dijit.LocateButton", "esri.dijit.HomeButton"Need to remove the dots and put slashes. At least I made a little progress today. 😉
require([ "esri/map", "esri/graphic", "esri/tasks/FindTask", "esri/tasks/FindParameters", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/symbols/Font", "esri/symbols/TextSymbol", "esri/Color", "dojo/on", "dojo/dom", "dijit/registry", "dojo/_base/array", "dojo/_base/connect", "dojox/grid/DataGrid", "dojo/data/ItemFileReadStore", "dijit/form/Button", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!", "dojox/widget/TitleGroup", "dijit/layout/AccordionContainer", "dijit/layout/TabContainer", "esri.dijit.Bookmarks", "esri.dijit.LocateButton", "esri.dijit.HomeButton" ], function( Map, Graphic, FindTask, FindParameters, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, Font, TextSymbol, Color, on, dom, registry, arrayUtils, connect, DataGrid, ItemFileReadStore, Button, parser, BorderContainer, ContentPane, domReady, TitleGroup, AccordionContainer, TabContainer, Bookmarks, LocateButton, HomeButton ) { map = new Map("map", { center: [-98.258, 38.236], zoom: 4, basemap: "streets" }); var geoLocate = new LocateButton({map: map}, "LocateButton"); var home = new HomeButton({map: map}, "HomeButton"); //var home = new HomeButton({map: map }, "HomeButton"); //home.startup(); });
require([" "esri/map",esri/dijit/LocateButton", "esri/dijit/HomeButton" ], function (Map, LocateButton, HomeButton){
hi michael,first, i recommend checking out this blog post.
dojo.require("esri.dijit.LocateButton"); .. geoLocate = new esri.dijit.LocateButton({map: map}, "LocateButton"); //becomes require(["esri/dijit/LocateButton", ...), function(LocateButton, ...) { geoLocate = new LocateButton({map: map}, "LocateButton"); }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.