|
POST
|
Just to be clear, which version of the API do you want to use for this? 3.18?
... View more
10-24-2017
10:23 AM
|
0
|
2
|
1913
|
|
POST
|
Gotcha, try this: https://codepen.io/solowt/pen/LzoQPe Older browsers/IE 11 don't support arrow functions so I'm guessing that's the issue.
... View more
10-24-2017
06:34 AM
|
0
|
2
|
756
|
|
POST
|
Make sure to host it and access the page via localhost.
... View more
10-24-2017
05:58 AM
|
0
|
4
|
756
|
|
POST
|
Are you hosting the page with a web server? If you're not there are different rules about whether your browser can make HTTP requests.
... View more
10-23-2017
02:10 PM
|
0
|
9
|
1615
|
|
POST
|
Actually I thought of another option with hitTest. You could programmatically fire off a bunch of hitTests in a circle around where the user clicked. I had some code to rasterize a circle lying around so here's a sample showing that as well: https://codepen.io/solowt/pen/MEdrgx?editors=1000 The basic idea here is just to get all the pixels in a filled circle with radius of X pixels and fire a hitTest for each pixel. Then take the results and eliminate duplicate graphics.
... View more
10-23-2017
01:11 PM
|
0
|
1
|
2960
|
|
POST
|
Here's a sample that makes a request to the geocoding service and asks for 1 result and plots that on the view: https://codepen.io/solowt/pen/LzoQPe
... View more
10-23-2017
12:53 PM
|
0
|
11
|
1615
|
|
POST
|
Take a look at the world geocoder information: World Geocoding Service—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers You should be able to send requests to the AGOL world geocoder to handle this for you.
... View more
10-23-2017
12:07 PM
|
0
|
0
|
1615
|
|
POST
|
I don't think there's an easy way to do this with hitTest. The only option I know of with hitTest is to symbolize the polylines with wider lines, but looking at your data that doesn't seem like a possibility for you. Aside from hitTest, you have some other options. Assuming these polylines are backed by a feature service, you could query the feature service with an extent or a polygon or a circle centered at where the user clicked with a radius equal to 5 pixels, then the server will respond with a list of polylines that intersect that circle. Another option is to do all this in the client. Depending on how many features you have, it's possible to test each feature against the extent/polygon/circle in the client and not worry about the server at all. Here's a sample that shows the server option: https://codepen.io/solowt/pen/rGgYQb?editors=1000 That's a point feature layer but it should work for polyline feature layers as well.
... View more
10-23-2017
12:03 PM
|
0
|
5
|
2960
|
|
POST
|
I'm not aware of a way to query features and ask for attachments in the same request (though that sounds pretty nice...), so multiple requests are most likely required for this. My bet is that the search widget just hasn't been set up to take care of this yet.
... View more
10-23-2017
11:22 AM
|
1
|
3
|
1325
|
|
POST
|
I don't quite understand what the goal is here. If you get a chance, please go into a little more detail about what you're trying to accomplish. I've done a little work with domains and I believe domain information is included on each layer on a feature service. When you add that layer to the map or load it, the client gets all the domain information and you should be able to query by specific attributes that have a domain.
... View more
10-23-2017
06:07 AM
|
0
|
1
|
2786
|
|
POST
|
In 4.5 it looks like you need to explicitly create a TileLayer using your URL like this: https://codepen.io/solowt/pen/wrbWgd?editors=1010
... View more
10-23-2017
05:54 AM
|
2
|
0
|
2701
|
|
POST
|
Try setting the where property of your Query object to null. Setting outFields to null is also probably a good idea.
... View more
10-20-2017
12:33 PM
|
0
|
0
|
2661
|
|
POST
|
Sounds like an interesting issue. I assume it's not a JS API bug if you can get this to work by changing the server version and leaving the JS API version the same. I'd suggest filing an issue with tech support for server. Of course the simplest solution might be to shorten the field name, if that's an option.
... View more
10-20-2017
11:14 AM
|
0
|
0
|
1154
|
|
POST
|
You could use various methods to force the scene layer to fetch the fields you're interested in. One way to do this is to modify the visualVariables of your simple renderer (assuming you're using a simple renderer) by adding "dummy variables," like this: {
type: "opacity",
field: 'NAME',
legendOptions: {
showLegend: false
}
} This will force the scene layer into fetching the attribute NAME. Then, when you perform sceneLayerView.queryFeatures() the returned graphics will have the NAME attribute. You could also overwrite the collectRequiredFields method on your render like this: renderer.collectRequiredFields = function(fields){
sceneLayer.fields.forEach(fieldInfo => fields[fieldInfo.name] = true)
} That should force the scene layer to fetch all fields, but it might break something else. When I try it on a sample layer it looks like one of the fields is not able to be fetched, so a lot of errors get thrown. Keep in mind that the attributes on the scene layer can't be changed. My understanding is that this is what the companion feature layer is for.
... View more
10-20-2017
10:59 AM
|
1
|
2
|
2661
|
| 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
|