POST
|
OK it seems its some problem of my understanding regarding fundamentals of ArcGIS Online. Actually we have our GPS data present in MongoDB and we need to show that data on an ArcGIS Map in hexagonal binning way. As per my research, I will first need to have an ArcGIS online account, then create a hosted Feature Layer service on it. Then import .geojson file into it and then consume this dataset from my Feature Layer service. But my question is, this way every time I will have to upload file to AcrGIS online thus to keep things in sync. But this approach appears to me cumbersome. Is there anyway that ArcGIS online can directly access data present in my MongoDB?
... View more
07-14-2017
01:15 AM
|
0
|
0
|
1461
|
POST
|
My GPS data will come via a WCF service call based upon certain parameters.
... View more
07-13-2017
12:46 AM
|
0
|
0
|
1464
|
POST
|
Thanks Thomas for replying. Actually I am fairly new to ArcGIS. I will explain my issue a bit however. Well, my GPS data will be totally dynamic based upon current zoom level plus some area. In our old application we used google map to generate heat map based upon this GPS data. That GPS data comes via a REST service call and this call occurs whenever map's zoom changes and/or its center is changed by dragging. Now how do I achieve that same thing in ArcGIS ?
... View more
07-12-2017
08:12 AM
|
0
|
2
|
1458
|
POST
|
My bad. That was a mistake. I have moved it to javascript category.
... View more
07-12-2017
01:35 AM
|
0
|
0
|
1461
|
POST
|
I have some huge number of GPS data which I want to plot on ArcGIS web map but in the form of hexagonal binning. The hexagons must be equal sized connected hexagons. An example similar to my scenario I found on this link but it is for ArcGIS Desktop. See the snapshot below also. I need to know how I can do that in latest version of ArcGIS API for Javascript 4.3. Can someone please guide. Thanks.
... View more
07-12-2017
12:57 AM
|
0
|
9
|
2605
|
POST
|
I am using ArcGIS javascript API 4.3 for loading map in my Asp.Net MVC web application. The map loads fine on my local machine but it does not load when I deploy my build on the server machine which is a Windows Server 2012 machine, the map does not load up and browser console complains something about "require" function not defined. I checked on my peer developer's machine and on that also map loads correctly but on server it still does not load. I am using following script headers related to ArcGIS core files: <link rel="stylesheet" href="https://js.arcgis.com/4.3/esri/css/main.css"> <script src="https://js.arcgis.com/4.3/"></script> I am suspecting it might be an issue of CORS. Can somebody please guide me what should I do to fix this issue? Please elaborate the solution as I don't know details of CORS much.
... View more
05-19-2017
09:04 AM
|
0
|
1
|
520
|
POST
|
Is there any mandatory token/credential required for loading ArcGIS javascript Map version 4.x? Google and Bing map require API Keys. So my question is does ArcGIS also require token/credential for loading its map?
... View more
05-19-2017
05:30 AM
|
0
|
2
|
569
|
POST
|
Thanks. Steve. I bought this book. Meanwhile your profile logo looked like first to me, as if you downvoted it
... View more
05-18-2017
11:51 PM
|
0
|
2
|
1277
|
POST
|
I searched on internet any good book related to ArcGIS javascript API. Found one but perhaps that makes use of API version 3 which is quite different from version 4. So I am wondering if there is any book available in market from Amazon or else where that targets version 4.x of ArcGIS javascript? Please guide. Thanks.
... View more
05-17-2017
10:07 AM
|
0
|
15
|
3616
|
POST
|
I am trying to plot some GPS points data in form of markers on map. After the map is rendered, I add a FeatureLayer onto map and in that the markers are added as graphics. <script> require([ "esri/views/MapView", "esri/Map", "esri/layers/FeatureLayer", "esri/layers/support/Field", "esri/geometry/Point", "esri/renderers/SimpleRenderer", "esri/symbols/SimpleMarkerSymbol", "dojo/dom", "dojo/on", "dojo/domReady!" ], function(MapView, Map, FeatureLayer, Field, Point, SimpleRenderer, SimpleMarkerSymbol, dom, on ) { var lyr, legend; var data; var graphics; /************************************************** * Define the specification for each field to create * in the layer **************************************************/ var fields = [ { name: "ObjectID", alias: "ObjectID", type: "oid" }, { name: "name", alias: "name", type: "string" }, { name: "lat", alias: "lat", type: "number" }, { name: "lng", alias: "lng", type: "number" }]; /************************************************** * Create the map and view **************************************************/ var map = new Map({ basemap: "streets", ground: "world-elevation" }); // Create MapView var view = new MapView({ container: "viewDiv", map: map, center: [-73.994909, 40.739041], zoom: 14 }); var pointsRenderer = new SimpleRenderer({ symbol: new SimpleMarkerSymbol({ style: "circle", size: 20, color: [211, 255, 0, 0], outline: { width: 1, color: "#FF0055", style: "solid" } }) }); view.then(function() { // Request the earthquake data from USGS when the view resolves data = getData(); graphics = createGraphics(data); // then send it to the createGraphics() method lyr = createLayer(graphics); // when graphics are created, create the layer // The following does not work as expected: view.whenLayerView(lyr).then(function(lyrView){ lyrView.applyEdits({ addFeatures: [{ geometry: new Point({ x: -73.983013, y: 40.741236 }), // select only the attributes you care about attributes: { ObjectID: 4, name: "Unit-4", lat: 40.741236, lng: -73.983013 } }] }) }); }); // Request the earthquake data function getData() { return [{ ObjectID: 1, name: "Unit-1", lat: 40.739041, lng: -73.994909 }, { ObjectID: 2, name: "Unit-2", lat: 40.742102, lng: -73.985043 }, { ObjectID: 3, name: "Unit-3", lat: 40.742856, lng: -73.984965 }]; } /************************************************** * Create graphics with returned geojson data **************************************************/ function createGraphics(response) { // raw GeoJSON data var geoJson = response; // Create an array of Graphics from each GeoJSON feature return geoJson.map(function(m, i) { return { geometry: new Point({ x: m.lng, y: m.lat }), // select only the attributes you care about attributes: { ObjectID: i, name: m.name, lat: m.lat, lng: m.lng } }; }); } /************************************************** * Create a FeatureLayer with the array of graphics **************************************************/ function createLayer(graphics) { var layer = new FeatureLayer({ source: graphics, // autocast as an array of esri/Graphic // create an instance of esri/layers/support/Field for each field object fields: fields, // This is required when creating a layer from Graphics objectIdField: "ObjectID", // This must be defined when creating a layer from Graphics renderer: pointsRenderer, // set the visualization on the layer spatialReference: { wkid: 4326 }, geometryType: "point" // Must be set when creating a layer from Graphics }); map.add(layer); return layer; } }); </script>
The fourth point/graphic that I am trying to add after the layer has once been added to map, is not showing up on map, although no error shows when I run this code. See the line with the comment "// The following does not work as expected:"
So my question is, How can I add new graphics on an ArcGIS map on an existing Feature Layer?
Here is the complete code JSBin:
... View more
05-11-2017
03:26 AM
|
0
|
3
|
5345
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|