arcgis-js-api

Uncaught TypeError: Cannot read property 'on' of undefined in arcgis

依然范特西╮ 提交于 2019-12-06 06:22:52
i am trying to display navigation tool and switch base map.Individually both are working good when i combine it its showing Uncaught Type Error: Cannot read property 'on' of undefined.can any tell me what is the mistake <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/> <title></title> <link rel="stylesheet" href="https://js.arcgis.com/3.15/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="https://js.arcgis.com/3.15/esri/css/esri.css"> <style> html, body,

ArcGIS JavaScript API 3.9 - mouse-drag events don´t work in Internet Explorer 11

喜你入骨 提交于 2019-12-05 18:21:47
I am facing a problem with mouse-drag event form ArcGIS API for JavaScript 3.9 in Internet Explorer 11 The code is below: map.on("mouse-drag", zobraudalost); function zobraudalost() { alert("test"); } The problem is that, this event doesn´t fire at IE 11 (as well as mouse-drag-start, mouse-drag-end). But on the other browsers it works fine (IE9, Firefox, Chrome). The other problem is that other mouse events (click, mouse-move, etc) work fine on IE 11, so the problem is only with the mouse-drags. Have ever you seen such problem? Do you know if there is some security settings in IE 11 which

How to set Arcgis Javascript dojoConfig relative path of packages

喜你入骨 提交于 2019-12-05 12:09:29
I am using Arcgis Javascript API. API is built on dojo toolkit. So I need to use dojo features in API. I am preparing dojo config file as following. var pathRegex = new RegExp("/\/[^\/]+$/"); var locationPath = location.pathname.replace(pathRegex, ''); var dojoConfig = { async: true, parseOnLoad: false, baseUrl:"js/", packages: [ { name: "application", location: locationPath + '/js/application' }] }; I created a bootstrapper.js like following. require(["application/main", "dojo/domReady!"], function (application) { console.log("bootstrapper is running"); application.Run(); }) And index.html

How can I use Esri Arcgis Map in ReactJs Project?

 ̄綄美尐妖づ 提交于 2019-12-04 11:44:17
问题 I'm trying to use Esri map. To include map in my project, here is what I found: require([ "esri/map", "esri/dijit/Search", "esri/dijit/LocateButton", "esri/geometry/Point", "esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", But there isn't any esri folder or npm package. Therefore, I'm confused here. How esri is imported in project? 回答1: An alternative method to the above is the one demonstrated in esri-react-router-example. That application

How do I find the center of a number of geographic points?

时光毁灭记忆、已成空白 提交于 2019-12-03 05:03:33
If I have a series of points as longitude and latitude, how would I calculate the center of all of those points? Geomidpoint covers 3 different methods for calculating this. Several people have answered to take the mean of the latitudes and longitudes. This is sort of the right idea, but means are more complicated on the sphere . The latitude/longitude representation is essentially artificial and has discontinuities (at the poles, and opposite the prime meridian if you aren't careful), so it taking means in it doesn't seem likely (to me) to have a sensible geometric interpretation. I think you

Trouble adding search widget to ArcGIS Shortlist Story App

时光毁灭记忆、已成空白 提交于 2019-12-02 17:54:11
问题 I 'm having issues adding in a search widget to a shortlist application. I have included the code below. The search bar shows up, but is not functional. I am needing to have this to where it can search business names that are included within the application. <html> <head> <title>ChahtaPreneur</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta

“Uncaught SyntaxError: Cannot use import statement outside a module” When Importing ES6

跟風遠走 提交于 2019-11-29 16:28:25
问题 I'm using ArcGIS JSAPI 4.12 and wishing to use Spatial Illusions to draw military symbols on map. When I add milsymbol.js to script, the console returns error Uncaught SyntaxError: Cannot use import statement outside a module , so I add type="module" to the script, the it returns Uncaught ReferenceError: ms is not defined . Here's my code: <link rel="stylesheet" href="https://js.arcgis.com/4.12/esri/css/main.css"> <script src="https://js.arcgis.com/4.12/"></script> <script type="module" src=

How to convert from UTM to LatLng in python or Javascript

梦想的初衷 提交于 2019-11-27 11:03:20
I have a bunch of files with coordinates in UTM form. For each coordinate I have easting, northing and zone. I need to convert this to LatLng for use with Google Map API to show the information in a map. I have found some online calculators that does this, but no actual code or libraries. http://trac.osgeo.org/proj4js/ is a projection library for Javascript, but looking at the demo it doesn't include UTM projection. I am still pretty fresh to the entire GIS domain, so what I want is something ala: (lat,lng) = transform(easting, northing, zone) Staale I ended up finding java code from IBM that

How to convert from UTM to LatLng in python or Javascript

妖精的绣舞 提交于 2019-11-26 15:25:07
问题 I have a bunch of files with coordinates in UTM form. For each coordinate I have easting, northing and zone. I need to convert this to LatLng for use with Google Map API to show the information in a map. I have found some online calculators that does this, but no actual code or libraries. http://trac.osgeo.org/proj4js/ is a projection library for Javascript, but looking at the demo it doesn't include UTM projection. I am still pretty fresh to the entire GIS domain, so what I want is something