|
POST
|
Your best bet may be to transform a series of control points into a "curved" line using some external library. I've played around with this and it seems to work fine.
... View more
07-19-2017
11:33 AM
|
1
|
1
|
1759
|
|
POST
|
Okay, it looks like this is a spatial reference issue. For the layer that failed to load, the spatial reference wkid is 9009l3. This looks to be another wkid for web mercator, so the view must have a spatialReference with wkid 102100 in order to add this layer. In these situation it's probably best to be explicit, so you should set the view's spatialReference manually: var tdtWMTSLayer=new WMTSLayer({
serviceMode:"KVP",
url:"http://t6.tianditu.com/img_w/wmts",
version:"1.0.0"
});
var map = new Map({
layers:[tdtWMTSLayer]
});
var view = new MapView({
container:"viewDiv",
map:map,
spatialReference: { wkid: 102100 }
});
For the layer that worked (http://t0.tianditu.com/img_c/wmts), the spatial reference is wkid 4490, so it's probably best to explicitly set the view's spatial reference to match that. These things should be handled automatically and should throw helpful errors, but for now I think setting the SR is the way to go.
... View more
07-19-2017
08:19 AM
|
0
|
1
|
2927
|
|
POST
|
Okay, I think the issues I was having were due to doing this from jsbin. I'm making requests from localhost now and things are working. I can load http://t0.tianditu.com/img_c/wmts I can confirm that http://t6.tianditu.com/img_w/wmts is not working and I'm looking into the issue with that now. The initial request does seem to be successful.
... View more
07-19-2017
07:49 AM
|
0
|
0
|
2927
|
|
POST
|
When I try to add that layer, 2 requests are made to the server hosting the layer information, but neither request succeeds. This may be a problem with how that server is configured or it may be an issue with how the requests are made. If you have a url for a WMTS layer that works, that could help me narrow this down.
... View more
07-19-2017
06:50 AM
|
0
|
6
|
2927
|
|
POST
|
I agree, it would be a good idea to have a "known issues and ETA on fix" section somewhere.
... View more
07-19-2017
05:44 AM
|
1
|
0
|
1372
|
|
POST
|
This bug came up on here a few weeks ago. I believe it has been confirmed and fixed, but I don't know when the fix will be released. In the meantime I suggest sticking with 4.3.
... View more
07-18-2017
01:07 PM
|
1
|
2
|
1372
|
|
POST
|
It looks like there is a text parameter on queries to a MapServer, it's mentioned in the REST API documentation. This will search for matches with the layer's display field, which happens to be STATE_NAME in this case. To use where instead, you could do this similar to how you indicated. You do need to wrap the value in single quotes. Another option is to use the new JavaScript template strings to make this easier. Note this uses backticks (`) as string delimiters: query.where = "STATE_NAME = '" + dom.byId("stateName").value + "'";
// OR
query.where = `STATE_NAME = '${dom.byId("stateName").value}'` You can have multiple clauses separated by AND or OR. I'm not sure where to find documentation about the SQL syntax that is accepted, although I seem to recall it being somewhere in the REST API documentation. It can be quite difficult to find useful information there to be honest.
... View more
07-18-2017
01:04 PM
|
1
|
0
|
2209
|
|
POST
|
Map servers generally host images. hitTest is a client-side search, so it won't be able to search images for features. When you specify MapServer/X, you're actually pulling in the features from a layer hosted on a FeatureServer. This will be searchable by hitTest. Try pulling from the FeatureServer instead of the MapServer. Just changing MapServer to FeatureServer in the URL may work ie: ...arcgis/rest/services/xxx/xxx/FeatureServer. In most situations if you have a MapServer you will also have a FeatureServer. It's possible this isn't the case though. Also note: highlighting was added to the 4.XX API for 3D in 4.4. I believe it's coming for 2D as well, possibly in 4.5. Another way to do your own highlighting is to use geometryEngine.convexHull in order to get a new polygon geometry that surrounds the passed in geometry. This works well for highlighting polygons and polylines.
... View more
07-18-2017
08:49 AM
|
1
|
1
|
1993
|
|
POST
|
Here's a sample showing how you might do this: JS Bin - Collaborative JavaScript Debugging The arrowhead image is a base64 svg, but you could use whatever image you wanted for the arrowhead. You might have to play with how the angle of rotation is calculated based on the orientation of the image you use.
... View more
07-18-2017
06:38 AM
|
0
|
0
|
6993
|
|
POST
|
Some types of symbols remain the same size as you zoom in and out. For example, PictureMarkerSymbols and SimpleMarkerSymbols do this. I think you could get something like this working using two graphics, one of them symbolized by a PictureMarkerSymbol to represent the head of the arrow and the other a polyline represented by a SimpleLineSymbol representing the rest of the arrow. You'd have to rotate the PMS based on the direction the arrow is facing.
... View more
07-18-2017
06:02 AM
|
0
|
1
|
6993
|
|
POST
|
here's a sample showing how to make an arrow drawing tool in the 4.XX API: https://jsbin.com/xicojevuni/edit?html,output (draw on the map to draw an arrow)
... View more
07-17-2017
12:21 PM
|
1
|
0
|
6993
|
|
POST
|
The 3.21 API has a draw tool that can draw arrows. This does not yet exist in 4.XX unfortunately. Here's the 3.21 tool (click arrow) ArcGIS API for JavaScript Sandbox A question though: you say the arrow should be drawn between point A and point B, but if A and B are fixed long/lats then the arrow has to scale as you zoom in and out. For example, in the 3.21 draw tool, both ends of the arrow are fixed long/lats, so the arrow must change sizes as the user zooms in and out. If it didn't change size, then it would no longer be fit to those two points. If the 3.21 tool matches what you need I can probably make a quick sample that does roughly the same thing for the 4.X API.
... View more
07-17-2017
08:24 AM
|
1
|
1
|
6993
|
|
POST
|
Can you share what the paths for this line look like after the graphic has been created? ie: console.log(JSON.stringify(bg.geometry));
... View more
07-17-2017
06:10 AM
|
0
|
0
|
1117
|
|
POST
|
I'm not sure how often the API is updated outside of major releases (I'm not part of the JS API team). This seems like a pretty big deal so I would hope it won't wait until 4.5. I can confirm that the issue has been accepted and fixed, but I don't know how long it will take for the fix to make it to the release codebase.
... View more
07-17-2017
06:04 AM
|
0
|
0
|
5227
|
|
POST
|
Thanks for the bug report. I've been able to reproduce this and I think I've identified the issue. Layer ids are being assigned incorrectly when the layer XML is converted to JSON, which will affect any WMS layer added after the first.
... View more
07-14-2017
09:12 AM
|
3
|
0
|
5227
|
| 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
|