|
POST
|
Not 100% sure of what you are asking, but here is my guess. I have a featurelayer called "operationsPointLayer" and in it's attributes table I have a field called "VERIFIED", it has 2 possible values Y or N. I draw the Y as green and N as red. var recordRenderer = new UniqueValueRenderer(defaultSymbol, "VERIFIED"); recordRenderer.addValue("Y", new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 8, null, new Color([0,204,0]))); recordRenderer.addValue("N", new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_CIRCLE, 8, null, new Color([255,0,0]))); operationsPointLayer.setRenderer(recordRenderer); When I edit the data and change N to Y the points change color. Or are you asking for the points to change color when selected in the map? In that case here is an example. Select with Feature Layer | ArcGIS API for JavaScript 3.19
... View more
01-04-2017
06:35 AM
|
0
|
0
|
390
|
|
POST
|
Packt has some ArcServer books for $5 this week, Esri and http://geospatialtraining.com/ are two companies that could help with training. But getting access to ArcServer software is expensive, Esri EDN has the software for $1,500 but is yearly. A cheap option is to get an Esri Developer account and learn how to use ArcGIS.com to create your own services but it's not ArcServer. ArcServer is mainly a way to server data, and geoprocessing service. The second option is programming to consume those services, for this the best option is JavaScript, using the ArcGIS JS API or Leaflet JS API, and now the Python Web API. These options are free to use and the web programming skills will enhance your resume. Leaflet is probably the easiest one to get started with and the Esri plugin allows you to use ArcServer services. Also you can take shapefiles and convert them to GeoJSON and use them as a data source. There is a ton of public ArcGIS REST services out there to get you started, Mash this up with some of your own GeoJSON or ArcGIS.com services and you can create some great web maps. Using ArcServer, GeoJSON, or ArcGIS.com to create data sources is the easy part, Being able to create web map applications and use the data is a far more marketable skill..
... View more
12-23-2016
05:32 AM
|
1
|
0
|
943
|
|
POST
|
Thank you, faster than Esri tech Support, although they did call back after your e-mail. I did earlier try to replace && with AND but it was outside the quotes and not seen as part of the string. Thanks….
... View more
12-14-2016
06:55 AM
|
0
|
0
|
1035
|
|
POST
|
After playing with this for a while, I realized I may have found a bug or limitation: operationsPointLayer.setDefinitionExpression(("TYPE='"+ value +"'") && ("VERIFIED='Y'")); Gives me all facility types Verified Y, basically ignores first expression operationsPointLayer.setDefinitionExpression(( ("VERIFIED='Y'")&&("TYPE='"+ value +"'")); Gives me the selected facility type ignoring the Verified field.(first expression) So ( condition A and condition B) is not the same end result as (condition B and condition A) FeatureLayer.setDefinitionExpression() may only work with a simple expression. The rest service for the feature layer can handle the dual field request, so it's in the api. Off to a support case.
... View more
12-14-2016
05:53 AM
|
0
|
2
|
1035
|
|
POST
|
I have a feature layer that I'm trying to pass a definition to and getting goofy results. My setup is a dojo select which passes a "TYPE" of facility and three Dojo radio buttons for Showing all data for that TYPE and/or all data for that type that is Verified Y/N. If I pick all, it just shows the data for that facility type. This works. If I pick No verified, it shows all data for that facility type and where the Verified field says 'N', this works. If I pick Yes verified, it shows all data for that facility type and where the Verified field says 'Y', this does NOT work, This tends to show all facility types where Verified equals 'Y', ignoring my Type requirement. I'm able to hit the REST service manually and "TYPE='ambulance' and VERIFIED='Y'" works. So it's not the service. I've set alerts and console logs, the correct values are being passed to this switch statement, it seems thesetDefinitionExpression for "Y" is the failure point. switch(check){ // Radio buttons set value for check, case "N": operationsPointLayer.setDefinitionExpression(("TYPE='"+ value +"'") && ("VERIFIED='N'")); break; case "Y": console.log(value +" -- "+check); //ambulance -- Y //TYPE='ambulance' and VERIFIED='Y' operationsPointLayer.setDefinitionExpression(("TYPE='"+ value +"'") && ("VERIFIED='Y'")); break; case "z": operationsPointLayer.setDefinitionExpression("TYPE='"+ value +"'"); break; } I've attached the complete page if needed. I've even taken the line where VERIFIED='N' which works and tried VERIFIED != 'N' which didn't work. I'm stumped any ideas would be appreciated.
... View more
12-13-2016
08:42 AM
|
0
|
3
|
1414
|
|
POST
|
Bring in the excel table to ArcMap, export it out as a dbf or GeoDatabase table, you have to export as ArcMap will not edit excel. Open the new table add in 2 new fields for the lat/Longs, define as double. Using the field calculator calculate their values to be the old lat/long fields, this should bring them over and save them as double.Once done, then right click on table, add X,Y enent and you should see the new fields. Make sure Lat is Y and Long is Z. Under projection, set it to 4326 / WGS 84 if it’s really Lat/Longs. The points should show up in the right place, if so then export out as Shapefile or FeatureClass and your done.
... View more
12-09-2016
06:05 AM
|
2
|
0
|
2081
|
|
POST
|
Thank you both, I was looking for a quick simple example and I could not find it in Google. We just needed a simple app to better place points and this will work.
... View more
12-09-2016
04:58 AM
|
0
|
0
|
1445
|
|
POST
|
I've spent the last couple hours trying to find an example of how to select and move a point without luck. Plenty of examples for lines and polys but not points. I'm using a featureService. Past experience has shown without examples it's very hard or stupid easy. Any sites or examples? .
... View more
12-08-2016
12:59 PM
|
0
|
3
|
2211
|
|
POST
|
Bring it in to arcmap, save as dbf, then check it’s field properties in the dbf. I would bet they are string.
... View more
12-07-2016
06:33 AM
|
1
|
0
|
2081
|
|
POST
|
May have better luck bringing in the data as a CSV instead of an excel format.
... View more
12-07-2016
05:16 AM
|
1
|
3
|
2081
|
|
POST
|
Check the field properties, very likely they are string for coordinates they need to be double. Might have to add new fields as doubles and calc the fields from the old string fields. Also check for things in the fields like commas as the software uses this to define them as strings.
... View more
12-07-2016
05:15 AM
|
2
|
2
|
2081
|
|
POST
|
Open a new MXD, Under View, Data Frame Properties put in 3702, now add data, the X,Y's, in the X,Y event dialog, the example you showed is (40.04746, -75.233316) is really Y, X, Lat is Y, Longitude is X, where it says set coordinate system, tell it what it is, (4326 -- wgs 84) not state plane. Once the data comes in you can export it out as a shapefile, with the option of using the dataframe (Stateplane S) or the layers (WGS84). pick dataframe and your shapefile will be in the right projection. The key is defining the data for what it is not what you want it to be. If it starts off in the wrong place it will end up in the wrong place.
... View more
12-05-2016
09:27 AM
|
1
|
0
|
1068
|
|
POST
|
Might be a simple CORS issue. I've run into this when I manually check a service and it runs then try to hit it with code and it doesn't. Check the console.
... View more
12-02-2016
08:46 AM
|
0
|
0
|
2266
|
|
POST
|
I was going toward this route when I saw your answer. It was cleaner then mine so I tried it. I also tried mapLayers.addTo(map); and this worked.
... View more
11-29-2016
06:56 AM
|
1
|
1
|
3614
|
|
POST
|
OK, I have a simple cancer web map in Leaflet and I'm stumped on a problem.
1. I have an HTML check box which when clicked turns on a layer. (Layer switcher is not an option) this basically calls a function and passes the cancer layer name. i.e.updateLayerVis("lung")
2. I have different types of cancer defined by name. i.e. var throat = new L.GeoJSON(data .....
3. So the function listed above passes the value 'lung' to 'a' below. It appears to be passing a dumb string called 'lung' while addTo is looking for a layer. Is it possible to use this string to add the appropriate layer to the map?
function updateLayerVis(a){
console.log(a); // lung
a.value.addTo(map); // returns an error "a.addTo is not a function"
a.addTo(map); // returns an error "a.addTo is not a function"
lung.addTo(map); //works but with 15 check boxes, I'd need a large switch function.
};
... View more
11-28-2016
07:27 AM
|
0
|
4
|
6999
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-05-2016 09:27 AM | |
| 1 | 06-12-2020 07:41 AM | |
| 1 | 12-23-2016 05:32 AM | |
| 1 | 11-23-2015 08:44 AM | |
| 1 | 11-25-2015 01:59 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-22-2021
12:31 PM
|