|
POST
|
What you're describing is more or less the behavior when you hold down right mouse button and move the mouse. You might try something like this: view.on('click', e => {
// the map point will be an x/y point on the earth's
// surface. to fix this, just maintain the current z
// of the camera
e.mapPoint.hasZ = true;
e.mapPoint.z = view.camera.position.z;
view.goTo({
target: view.center,
position: e.mapPoint
});
});
... View more
06-16-2017
05:58 AM
|
0
|
1
|
2454
|
|
POST
|
I think, in general, the center and camera properties are going to conflict with one another. My recollection is that setting the center (or extent) or a sceneview may change the position of the camera, but it won't change the tilt and heading of the camera. It may be that you're expecting to be able to set the position of the camera and then set the center in order to rotate the camera so that it's facing the new center. To get something close to this behavior, you could try something like this: // maintain current position of camera, but set the center
// to something new
view.on('click', e => {
view.goTo({
target: e.mapPoint,
position: view.camera.position
});
}); I might be misunderstanding the behavior you're after though.
... View more
06-15-2017
12:04 PM
|
0
|
0
|
2454
|
|
POST
|
Okay, interesting. I'd like to look into this but I don't have a windows machine to run IE without jumping through a lot of hoops. I can confirm that the JS API uses Sets. If browser compatibility is the issue (some browsers not supporting some aspects of Sets that the API makes use of) then a polyfill seems like the only viable option. Ideally that would be done in the API so users didn't have to worry about it. IE 11 is supposed to work with the 4.XX API, and I understand that it's still widely used, so this seems like a pretty significant issue.
... View more
06-15-2017
09:28 AM
|
0
|
0
|
2095
|
|
POST
|
Yeah, this could be an error in how the JS API 4.3 interprets renderers. I'm unsure if null is specified as a valid value for colors. Apparently it's not if it's the cause of this error, but according to the agol web map viewer, it is a valid value.
... View more
06-14-2017
02:16 PM
|
0
|
0
|
2335
|
|
POST
|
After looking at the web map JSON for this webmap, I noticed what may be the source of this issue in the renderer; {
"value": "Customer Owned",
"symbol": {
"color": null, // color is null
"size": 0.75,
"angle": 0,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": "esriSMSCircle",
"outline": {
"color": null, // color is null
"width": 0.75,
"type": "esriSLS",
"style": "esriSLSNull" // invalid style
}
},
"label": "Customer Owned"
} This is the symbol that is displayed for "customer owned" features. I didn't see the error you mentioned when I loaded the map, but I also couldn't render this symbol in the legend widget, probably because the color is null and style of the outline is invalid. I could easily see how this issue could cause the error that you ran into. I think the best way to fix this is through whichever application was used to set up this renderer in the first place. You can do this in the arcgisonline map viewer.
... View more
06-14-2017
12:00 PM
|
0
|
0
|
2335
|
|
POST
|
If the web map is an arcgis online item and the map is shared, the id should be enough.
... View more
06-14-2017
11:27 AM
|
0
|
2
|
2335
|
|
POST
|
You could find the difference between xmin and xmax and divide by 2. If you convert xmin and xmax to web mercator, this will the radius in meters. This will be the planar distance. If you want to find the geodesic distance, you could create a polyline with two points and use geometryEngine.length(<polyline geometry>).
... View more
06-14-2017
10:37 AM
|
2
|
0
|
1858
|
|
POST
|
I'm not sure what's causing this. It looks like toRgba is a function on 'esri/Color.' So presumably at some point the API is expecting to get a color and gets null instead. Are you able to provide the web map in question in a sample? I'd be happy to take a look at it.
... View more
06-14-2017
10:34 AM
|
0
|
4
|
2335
|
|
POST
|
Confusingly, it seems that polygon rings can be either of these. But you'll have to use the second if you want a multi-ring polygon.
... View more
06-14-2017
07:48 AM
|
0
|
0
|
3717
|
|
POST
|
I'm not sure when selection will be released, but I don't think it's part of the next major release (4.4). Graphic highlighting is coming in 4.4 though. I've had to implement my own feature selection functionality on top of the API and, depending on your needs, this might be fairly easy for you to achieve.
... View more
06-14-2017
07:40 AM
|
1
|
0
|
682
|
|
POST
|
That's a warning, but it shouldn't stop anything from working. What happens if you add a .then, like: geometryEngineAsync.geodesicBuffer(geometry2, [distance], distanceUnits, true).then(function(results){
console.log(results);
});
All of the geometry engine async methods return a promise, so the results need to be obtained by chaining a .then.
... View more
06-12-2017
01:44 PM
|
1
|
1
|
1652
|
|
POST
|
For any large operation like this I would recommend the geometry engine async. That version of the geometry engine runs in another CPU core via a web worker, so it won't lock up the main thread. It seems like you've tried that but run into some issues. Can you post an abbreviated sample? I wouldn't think jQuery would cause problems here. I'm not aware of any upper limits, but 50,000 parcels does seem like a lot. I would look for ways to make that number smaller, but I don't know what you're going for exactly.
... View more
06-12-2017
01:31 PM
|
0
|
3
|
1652
|
|
POST
|
Thanks for the sample. It looks like there's two bugs here: the first (not relevant to you) is that 'on-the-ground' graphics in a graphics layer only use a popup template set on the individual graphic, they don't look for a popupTemplate on the layer itself. The second (relevant to you) concerns how feature layers constructed from a source are searched. Since there's no backend resource for these feature layers, the search is done in the client. This works fine for geometries that are not 'on-the-ground,' but for anything that is draped on the ground, there are a few issues. Here's a workaround that may fix this issue for you, for now: // layer is any feature layer you create from a source.
// this code should be placed somewhere after the layer has been created
layer.createQuery = function(){
let q = layer.__proto__.createQuery.call(layer);
q.outFields = null;
q.where = null;
return q;
} Please let me know if that helps.
... View more
06-12-2017
01:24 PM
|
2
|
3
|
2607
|
|
POST
|
Okay, after looking at this: can you try setting the popupTemplate on each graphic? It can be on the layer also, but please check to see if setting it on the graphic changes anything.
... View more
06-12-2017
10:36 AM
|
0
|
5
|
2607
|
|
POST
|
I'll take a look at this, it may have to do with hitTest. Can you provide a sample with the layer in question in a scene view? Could you also be more specific about what you mean by using the source for a feature layer?
... View more
06-12-2017
06:29 AM
|
0
|
7
|
2607
|
| 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
|