|
POST
|
It seems possible that IE 11 has limited support for Sets which are relatively new to JavaScript. I'm not 100% sure this is the issue, and that page does indicate that basic support exists in IE 11. I recommend using a polyfill like: es6-set and ensuring that it loads before the JS API, if only to rule out that this is the problem.
... View more
06-10-2017
09:01 AM
|
1
|
2
|
2065
|
|
POST
|
Here's a sample that seems to work for me: JS Bin - Collaborative JavaScript Debugging I also ran the polygon through geometryEngine.simplify because it was returning a negative area (maybe because it has counter clockwise rounding).
... View more
06-08-2017
03:46 PM
|
1
|
1
|
5252
|
|
POST
|
The geometry is property on the graphic, but it's distinct from the graphic. Basically, a graphic consists of three things: a geometry which describes its shape (in this case a polygon), attributes which are key-value pairs (not important here), and a symbol which decides the color and size of the graphic when it's added to the map. Try this: var graphic = new Graphic(myPolygon); map.graphics.add(graphic); var geographicGeometries = []; geographicGeometries.push(geometryEngine.geodesicArea(graphic.geometry, "acres")); var areas = geographicGeometries; console.log(areas); } dom.byId("result").innerHTML = "The area of the polygon is: " + areas[0] + " acres";
... View more
06-08-2017
03:01 PM
|
0
|
3
|
5252
|
|
POST
|
I would say the issue is probably how you're creating the polygon geometry. It looks to me like you have a graphic JSON, not a polygon JSON, so you could do it like this: var graphicJSON = {"geometry":{"rings":[[[-115.3125,37.96875],[-111.4453125,37.96875],
[-99.84375,36.2109375],[-99.84375,23.90625],[-116.015625,24.609375],
[-115.3125,37.96875]]],"spatialReference":{"wkid":4326}},
"symbol":{"color":[0,0,0,64],"outline":{"color":[0,0,0,255],
"width":1,"type":"esriSLS","style":"esriSLSSolid"},
"type":"esriSFS","style":"esriSFSSolid"}};
var polygonGraphic = new Graphic(graphicJSON); In this case, you could access the polygon with polygonGraphic.geometry.
... View more
06-08-2017
07:34 AM
|
0
|
5
|
5252
|
|
POST
|
When you say smooth line, do you mean the graphic representing the vehicle should move in a smooth line, or the camera following it? To get the camera to move smoothly, you can play with the goTo function in that sample. Adding a second parameter of { duration: 1500 } to goTo makes it look pretty smooth to me. If you're talking about the graphic, the main variables are how frequently location updates are occurring, how fast the thing being tracked is moving, and how far the user is zoomed in. If there's an update every 100 ms and it's a car, it's going to look pretty smooth. If updates aren't going to be that frequent, and it's absolutely necessary that the track be smooth, you could interpolate the movement between the last known point and the current known point. This would be artificial in that the position of the graphic would not reflect the currently up-to-date location of the thing being tracked. I would approach this by densifying a polyline between the last known position and current known position and moving the graphic along that polyline. You'll have to handle a situation where another update comes in before the graphic has reached the currently known location.
... View more
06-08-2017
06:10 AM
|
1
|
0
|
647
|
|
POST
|
Try { ..., content:JSON.stringify(params), ... } It may be interpreting your params as FormData or something along those lines.
... View more
06-07-2017
05:11 PM
|
2
|
7
|
6094
|
|
POST
|
Try the geometryEngine.geodesicArea method. It takes a geometry (likely a polygon) and a unit (which would be 'acres' for you). Ref: esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript 3.20
... View more
06-07-2017
12:52 PM
|
1
|
7
|
5252
|
|
POST
|
I can open that sample just fine with something like file:///home/XXX/Desktop/index.html in chrome. I agree with Robert though: you'd normally want to host the file locally and access it via localhost. Accessing it from a path to a file limits what you can do in terms of http requests.
... View more
06-07-2017
09:49 AM
|
1
|
0
|
2510
|
|
POST
|
Right. Unfortunately this option is only available in a 4.X scene view.
... View more
06-06-2017
01:55 PM
|
1
|
1
|
2774
|
|
POST
|
There are two ways to do this that I know of. If it's a 3D sceneview in the 4.X API you can use scene.takeScreenshot. If you're using 3D I can give you an example. If you're not, I recommend using this third party open source library: GitHub - tsayen/dom-to-image: Generates an image from a DOM node using HTML5 canvas I know a few people who have successfully extracted a jpg from a 2D map using that.
... View more
06-06-2017
08:39 AM
|
0
|
2
|
1641
|
|
POST
|
Here's a sample that uses webGL via Three.js to draw 400000 random points in a scene view. Click the scene to add 400K points: JS Bin - Collaborative JavaScript Debugging Since these aren't esri/graphics, they don't have popups or anything like that. If you wanted to try this route (rendering points with webgl) you could use three js's raycaster to add a click event that would detect when the user clicked a point and open a custom popup or something like that.
... View more
06-06-2017
08:35 AM
|
2
|
3
|
2774
|
|
POST
|
ArcGIS Server/Portal does not come with an email server. If you have access to an email server then I imagine you could set this up.
... View more
06-05-2017
11:52 AM
|
0
|
0
|
1641
|
|
POST
|
I'm not sure what you mean. All the attribute data should be in the client if outFields is specified in the feature layer constructor. You don't actually have to use query at all: you can just change the attributes in the client and then call featureLayer.applyEdits({updates:[graphic]}).then(response => console.log(response)); Since you're doing this in the popup window, you have access to a reference to the graphic in popup.viewModel.selectedFeature
... View more
06-04-2017
08:54 AM
|
1
|
0
|
2631
|
|
POST
|
You can absolutely hand code this yourself, but you're going to need to have logic for showing inputs/hiding text when the edit button is clicked and extracting the user input information from the inputs.
... View more
06-03-2017
08:49 PM
|
2
|
2
|
2632
|
|
POST
|
Here's a sample I made based on the externalRenderers sample in the JS API SDK: JS Bin - Collaborative JavaScript Debugging Click on the map to add a square of material X meters over the terrain that conforms to the terrain. I set it to be a mesh, but you can make it solid. The width, resolution, and height above ground are also adjustable. This uses Three.js from a CDN to handle the creation and placement of the geometry and some code to sample the terrain elevation where the geometry is placed. I'm hoping to keep looking at this to see how mesh geometries are rendered in a scene layer situation. This should be possible without Three.js and with arbitrarily shaped polygons.
... View more
06-03-2017
05:36 PM
|
0
|
0
|
1949
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-03-2017 08:23 AM | |
| 1 | 11-02-2017 08:36 AM | |
| 1 | 11-02-2017 09:23 AM | |
| 1 | 09-20-2017 02:07 PM | |
| 1 | 10-06-2017 05:54 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|