|
POST
|
You have a left bracket in front of the CityName field in the if statement - I see I made the same error in my previous reply
... View more
12-08-2016
12:16 AM
|
0
|
2
|
4218
|
|
POST
|
That's weird, because I tested the expression on a layer with Null values in the attribute filed and it worked. How about adding a None type check in there? def FindLabel ( [CityName] ):
try:
if [CityName] is not None:
return [CityName][:1]
except AttributeError:
pass
... View more
12-08-2016
12:07 AM
|
2
|
4
|
4218
|
|
POST
|
It's probably due to an empty/Null attribute value, which could be returned as None. Try this definition expression: def FindLabel ( [CITY_CODE] ):
try:
return [CITY_CODE][:1]
except AttributeError:
pass
... View more
12-07-2016
10:58 PM
|
1
|
0
|
4218
|
|
POST
|
You could simplify the definition function even further: def FindLabel ( [CITY_CODE] ):
return [CITY_CODE][:1]
... View more
12-07-2016
10:54 PM
|
1
|
6
|
4218
|
|
POST
|
You haven't loaded your custom(?) basemap/Image Service over you features by accident?
... View more
12-07-2016
10:43 PM
|
0
|
1
|
2013
|
|
POST
|
This is what my toolbar looks like when posting - notice the Expand toolbar option. If you click on that you'll get an option for More, under which the Syntax Highlighter resides. See this post for a possible reason why: where is my syntax highlighting!!! | GeoNet
... View more
12-07-2016
10:15 PM
|
0
|
1
|
3480
|
|
POST
|
The deafult projection for most Web base maps like OSM is Web Mercator, which is completely different from LatLon geographic coordinate system (GCS). Have a look at esri/geometry/webMercatorUtils | API Reference | ArcGIS API for JavaScript 3.18 for converting between geographic and Web Mercator coordinates,
... View more
12-06-2016
10:42 PM
|
1
|
0
|
905
|
|
POST
|
Trying a different mode might solve your problem. What happens if you refresh the feature layer (FeatureLayer | API Reference | ArcGIS API for JavaScript 3.18 ) after the map extent has changed?
... View more
12-06-2016
10:39 PM
|
1
|
0
|
1391
|
|
POST
|
The only output for your Results should be in the keyup function and element #tesr refers to the input and not the column values. Also, what are you trying to achieve with $("#tesr").val(); in the keyup function? For future, can you please use the syntax editor. Also, for your JSON objects, be consistent with the definition by using double quotes only e.g. cols.push({ "sTitle": "ID" });
... View more
12-06-2016
10:31 PM
|
2
|
4
|
3480
|
|
POST
|
As long as you clear the timeout handler before setting it again it should be fine.
... View more
12-06-2016
10:21 PM
|
0
|
1
|
3120
|
|
POST
|
Have you defined the "load" event listener before adding the layer to the map (GraphicsLayer | API Reference | ArcGIS API for JavaScript 3.18 )? As for update event listeners, they only fire when the viewport changes. Otherwise, if it an issue of waiting for the API to draw a lot of features and the browser "hangs", have a look at the graphic-add event (GraphicsLayer | API Reference | ArcGIS API for JavaScript 3.18 ) - you could set a timeout handler after a graphic has been added and then just hide the loading icon after all the graphics have been added.
... View more
12-06-2016
12:56 AM
|
2
|
3
|
3120
|
|
POST
|
The hybrid layer uses two different Map Services to show the imagery and the labels and I think the basemap constructor for that layer will always put the labels on top. If you want to manipulate the labels layer seperately, you might need to use the satellite layer (Imagery without labels) as basemap and add the label reference layer separately (Reference/World_Boundaries_and_Places (MapServer) ) . Then you can use the map.reorderLayer function (Map | API Reference | ArcGIS API for JavaScript 3.18 ) to set the labels layer index
... View more
12-05-2016
10:38 PM
|
1
|
1
|
1814
|
|
POST
|
No, visibility is not required, but like Robert said you must wait until the features are completely loaded and the definition query set. I've tested the principle of iterating through the featurelayer graphics and it works. For my test example the MODE_ONDEMAND was used.
... View more
12-05-2016
02:01 AM
|
1
|
0
|
2513
|
|
POST
|
To determine which mouse button is clicked, you can use the "mouse-down" event listener e.g. map.on("mouse-down", function(evt){
console.log(evt.which) // will return which button was clicked
if (evt.which == 1) {
console.log("left button");
} else if (evt.which == 2) {
console.log("middle button");
} else if (evt.which == 3) {
console.log("right button");
}
}) Make use of the evt.preventDefault() function to prevent any default button click behaviour during your edit session.
... View more
12-05-2016
01:07 AM
|
2
|
1
|
2443
|
|
POST
|
Use the "keyup" event instead of the "change" event as listener for setting the value for "input". The .val() function should return the input text value, otherwise go old school and use document.getElementById('tesr').value
... View more
12-05-2016
12:26 AM
|
0
|
6
|
3480
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 03-22-2024 12:37 AM | |
| 1 | 10-02-2025 10:28 AM | |
| 1 | 09-17-2024 12:29 AM | |
| 1 | 03-15-2024 11:33 AM | |
| 1 | 03-13-2024 11:20 PM |
| Online Status |
Offline
|
| Date Last Visited |
06-02-2026
12:31 AM
|