Uncaught TypeError: webMercatorUtils.webMercatorToGeographic is not a function

المشرف العام

Administrator
طاقم الإدارة
I have write the following code for displaying coordinates of a map.But coordinates are not displayed and getting error i.e "Uncaught TypeError: webMercatorUtils.webMercatorToGeographic is not a function". Please help me how to solve this issue.

Simple Map html,body,#map{ height:100%; width:100% } var map,overviewMapDijit;

require(["esri/map", "esri/dijit/OverviewMap", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "esri/geometry/webMercatorUtils", "dojo/dom", "dojo/domReady!"], function(Map,OverviewMap,parser,webMercatorUtils,dom) { parser.parse(); map = new Map("map", { basemap: "streets", center: [82.45, 22.75], zoom: 5 }); overviewMapDijit = new OverviewMap({ map: map, visible: true }); overviewMapDijit.startup(); map.on("load", function() { map.on("mouse-move", showCoordinates); map.on("mouse-drag", showCoordinates); }); function showCoordinates(evt) { var mp = webMercatorUtils.webMercatorToGeographic(evt.mapPoint); dom.byId("info").innerHTML = mp.x.toFixed(3) + ", " + mp.y.toFixed(3); } });




أكثر...
 
أعلى