|
POST
|
The documentation says: Use label classes to restrict labels to certain features or to specify different label fields, symbols, scale ranges, label priorities, and sets of label placement options for different groups of labels. But I don't see anything about priority in any property or method listed below. Looking at the source code, it looks to me like priority is based on the label placement. It's possible I'm missing something though. My feeling is that if you wanted to do a really good job with this you'd probably have to do it yourself using text symbols and a graphics layer for labels. Unfortunately I imagine that this would be a lot of work. You would need to re-render labels as the user zooms in and out and the distance between features (in pixels) changes. You might also have to use standoff lines in order to connect a feature to its label in situations where features are clustered closely. All of this is doable, but not a small project.
... View more
08-24-2017
08:54 AM
|
1
|
2
|
2036
|
|
POST
|
I don't think this concept is supported by text symbols. One solution would be to write a function that returns a polygon ring representing a letter. This wouldn't be difficult to write but it would be time consuming as you'd have to handle creating a ring for each letter you need.
... View more
08-24-2017
06:42 AM
|
0
|
0
|
1028
|
|
POST
|
Try using a graphics layer instead of view.graphics. Your popup should work if you do that. This is a longstanding bug. As far having different attributes for each point in a multipoint, there's no built-in way to do this that I'm aware of. I would suggest using many point graphics instead of a multipoint if you need this. Instantiating many different geometries and graphics can be expensive but only if there are a relatively large number of graphics. For most users this isn't an issue. If it is an issue for you, one solution would be to have a dictionary that maps [x, y] to popup templates and at some point in the opening popup process that occurs on click, you could do a lookup in this map and change the content/title of the popup template.
... View more
08-24-2017
06:39 AM
|
1
|
1
|
2147
|
|
POST
|
I don't know of any Esri software that does this. My understanding is that all KML parsing is handled on the backend. There are open source libraries to convert KML into geoJSON, such as: GitHub - mapbox/togeojson: convert KML and GPX to GeoJSON, without the fuss (haven't tried it) Once you have geoJSON you can turn that into a feature collection easily enough.
... View more
08-24-2017
06:00 AM
|
1
|
0
|
2555
|
|
POST
|
To give a little more details, it does seem that you can set an InfoTemplate's content to a function, but it's not clear to me that that function can return a deferred object. This example doesn't work: function giveString(){
return new Promise(fulfill => {
setTimeout(()=>fulfill('content'),500);
});
}
// throws error
let template = new InfoTemplate({
content: giveString
});
... View more
08-23-2017
10:24 AM
|
0
|
5
|
5323
|
|
POST
|
At this point in your code: var pt = new InfoTemplate({
content: getPopupTemplate
}); You're setting the content equal to the result of getPopupTemplate, which is a promise (or a deferred object). You need to reformulate things roughly like this: getPopupTemplate(target).then(function(html){
var pt = new InfoTemplate({
content: html
});
});
... View more
08-23-2017
07:19 AM
|
0
|
6
|
5323
|
|
POST
|
Here's a sample that strips out each feature layer JSON from the request and replaces it with object ids filtered by the view's extent: JS Bin - Collaborative JavaScript Debugging This doesn't seem to work from jsbin, but if you copy the html/js to here: ArcGIS API for JavaScript Sandbox and it works for me. The specifics of this process might vary for you but the specification does appear to be correct, so you can pass in objectIds rather than entire features. For this example, the content length went from 169,698 to 11,319 and the image seems the same to me. I don't know why the JS API sends entire features, but there may be a good reason for it (or not).
... View more
08-23-2017
07:04 AM
|
1
|
0
|
1051
|
|
POST
|
20 MB, wow. Just curious, how many features are being sent? I think it's possible that you can send objectIds instead, as it says in the documentation, but (for whatever reason) sending whole features is preferred. I haven't tried it, but you might be able to tap into your export requests before they're sent using the "setRequestPreCallback" (as Robert mentioned) and replace the features with objectIds before the request is sent. Another option would be to strip out attributes and other extraneous from the request. You may not need most attributes (depends on your renderer) or you may be able to delete the attribute property entirely. I'll see if I can get a sample working to try out objectIds.
... View more
08-23-2017
06:11 AM
|
0
|
2
|
1051
|
|
POST
|
My feeling is that the features are going to have to make their way to the print service one way or another in order to be converted to an image. Whether this is done by your client sending whatever feature data it has currently or the service making separate requests to the feature service based on the oids passed in, the result is going to be more or less the same. It's surprising to me that this is causing issues. Are the features that get passed in filtered by the extent of the view? How many features are we talking about here?
... View more
08-22-2017
01:30 PM
|
0
|
6
|
3624
|
|
POST
|
In the top-right ui holder, the space between widgets is decided by margin-bottom, so you could add a new CSS rule like: .esri-ui-top-right .esri-component{
margin-bottom: 0;
} sample: JS Bin - Collaborative JavaScript Debugging (default is 10x, 0 results in some overlap)
... View more
08-22-2017
08:52 AM
|
1
|
1
|
1378
|
|
POST
|
What do you mean by download user graphics? Do you want to save user drawn graphics in a file, locally? In what format, a ,json file with a json array of graphics? If I understood you question correctly, here's one way you might approach this: // start with array of graphics from any source
let graphics = [graphic1, graphic2, graphic3];
// convert each graphic into JSON, now we have a valid JSON array
let jsonGraphics = graphics.map(g => g.toJSON());
// first stringify the JSON, then URI encode it
let jsonString = encodeURIComponent(JSON.stringify(jsonGraphics));
// now you could set the JSON string as the href of an anchor tag with a download attribute
let a = document.getElementById('download-graphics')'
a.setAttribute('href', `data:text/json;charset=utf-8,${jsonString}`);
a.setAttribute('download', 'graphics.json');
// now click the anchor link to download the .json file file There are other methods to get the browser to download a file. One of them is to open a new tab with a MIME type of 'application/octet-stream' instead of 'text/json'.
... View more
08-21-2017
10:46 AM
|
5
|
3
|
4862
|
|
POST
|
Are you seeing this with other widgets or only search? The 4.XX widgets use a virtual DOM called maquette, and it seems possible that this is causing the issue.
... View more
08-21-2017
06:12 AM
|
0
|
2
|
1809
|
|
POST
|
Have you looked at this? Securing web services with Integrated Windows Authentication—Installation Guides (10.5) | ArcGIS Enterprise I don't have any experience with anything other than arcgis server token authentication unfortunately so I'm not sure how to troubleshoot this issue. Off the top of my head, when I look at your request to the MapServer that fails, nothing seems to be getting passed in that would enable authentication. When you tried the open source example that worked, what did your requests look like?
... View more
08-18-2017
10:29 AM
|
1
|
1
|
4385
|
|
POST
|
It looks like .5 is 50%, which will shrink it. That's a little confusing because the method is called "expand," but I'd give 1.5 a try to grow the extent by 50%.
... View more
08-18-2017
05:47 AM
|
1
|
0
|
5856
|
| 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
|