javascript - Esri Dojo component is unable to find div when placed inside polymer element -


While working on a polymer website, I wanted to contain most of the functionality required for ESOS's dojo-based map component I used the code again as a polymer component I tried to create an element using the code given below, but the map constructor throws an error because it can not be found with the 'map' ID

  & lt; Link rel = "stylesheet" href = "http://js.arcgis.com/3.11/esri/css/esri.css" & gt; & Lt; Link rel = "stylesheet" href = "http://js.arcgis.com/3.7/js/dojo/dijit/themes/claro/claro.css" & gt; & Lt; Polymer-element name = "esri-map" & gt; & Lt; Templates & gt; & Lt; Style & gt; #map {height: 100%; Width: 100%; Margin: 0; Padding: 0; Background color: wheat; } & Lt; / Style & gt; & Lt; Div id = "map" render = "" & gt; & Lt; / Div & gt; & Lt; / Template & gt; & Lt; Script src = "http://js.arcgis.com/3.11/" & gt; & Lt; / Script & gt; & Lt; Script & gt; Polymers ({ready: function} (var "map", {basemap: "topo" center: ["eser / map", "dojo / domReady!"], Function (map) -122.45, 37.75], longitude, latitude zoom: 13});});}}); & lt; / script & gt; & lt; / polymer element & gt;  

When the element is used then div is called and i can see it, but the following javascript error occurs:

Unkit type error: property 'id' 'zero' '

I do not know if anyone has any of these two questions Doctors have the experience of trying to play well, but any help would be appreciated.

Includes some code that shows how to do this div id = "map" in the template body.

Note how you can find the element. Depending on this, you will have to use this .Map Map or self. $ Map I believe that it's already okay for you. However, when you posted in November.

  Polymers ({// default here provide signal as a type of polymer betamap: blank, extent: '- 130,25, -65,50', wkId: 4326, map : Blank, ready: work () {}, domReady: function () {var self = this; is required (['esri / map', 'esri / layers / featureless',' sisters / layers / Female / digit / popup ',' female / digit / popup template ',' photo / geometry / extant ',' photo / special reference ', dojo / read'], function (map, feature) Weir, ArchigilidMark service service, popup, popup template, extant, special reference, ready) {var mapOptions = {auto resize: true, unsampled: self. Betamap, slider position: 'top right'}; if (self. {Var ext = self.extent.split (','); MapOptions.extent = new Extent (+ ext [0], + ext [1], + ext [2], + ext [3], new special reference ( {Wkid: self.wkId});} Self.popup = new popup ({}, dojo.create ("div")) Self.map = new map (auto $. Map, map options);  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -