POST
|
Hi Jake, Thanks for the reply. tried what you suggested and it didnt work, I put the console log as well as results[0].features and it returned an error. So I think the results.features[0] is correct.
... View more
02-19-2015
09:30 AM
|
0
|
4
|
620
|
POST
|
Ive done this many times, but for some reason this is not working for me and I have no clue why. The execute statement looks like qt.execute(query, function(results) { console.log(results.features[0]); //symbol not used(will be used once polygon is figured out var redSymbol1 = new SimpleFillSymbol( SimpleFillSymbol.STYLE_SOLID, new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255, 0, 0]), 3), new Color([255, 0, 0, 0.4]) ); var graphic1 = new Graphic(results.features[0].geometry, redSymbol1); //Add graphic to the map graphics layer. map.graphics.add(graphic1); }); the console.log mentioned above shows this has an output
... View more
02-19-2015
09:01 AM
|
0
|
9
|
4205
|
POST
|
Thanks for your help; I tried the method you mentioned and I cant seem to get it to work. map.graphics.on("click", function(evt) { console.log("before edit"); ALFLayer.applyEdits(evt.graphic,null,null,null,errCallback); console.log("after edit"); console.log(evt.graphic); }); I put some console.logs to see whats happening. the console.log(evt.graphic) shows a geometry and attribute. But when I do apply edits, nothing seems to happen in the data table. Im wondering if its because a field that cant be null is becoming null? one thing I noticed is when the applyedits code runs, that progress bar below the edit bar never goes away, so it must be stuck on something; even though nothing shows in the console.
... View more
02-11-2015
05:38 AM
|
0
|
2
|
364
|
POST
|
Hey everyone, Not sure if this is possible on the API, but im wondering if there is a way to add an existing graphic to a feature layer. Editor widget with simple toolbar | ArcGIS API for JavaScript this sample allows you to draw a graphic (polygon) and it would add it to a feature layer. What Im trying to do is have a user look up an address (Identify with Popup - as seen here, the user can click an address and it would highlight that polygon) and that address polygon would go into a feature layer upon click.
... View more
02-10-2015
06:11 AM
|
0
|
4
|
3910
|
POST
|
I knew there was some function I missed, thanks for all the help robert.
... View more
01-13-2015
12:41 PM
|
0
|
0
|
409
|
POST
|
Ok, what I did was var selectionSymbol = new SimpleFillSymbol().setColor(new Color([0,0,0,0])); councilDistrictLayer.setSelectionSymbol(selectionSymbol); Like Robert suggested, but in the query I did a <> (not equal) that way it selects all others and turns the alpha to 0. Im sure there is a better way to do it, but in case anyone comes across the same issue, that's how I did it.
... View more
01-13-2015
11:10 AM
|
0
|
2
|
409
|
POST
|
Thanks for the reply, I did do that earlier but that what I'm trying to do is only show the selected geometry.
... View more
01-13-2015
11:05 AM
|
0
|
3
|
409
|
POST
|
Hey guys, I am trying to filter out the geometries in a feature layer using a select box. In c# you could just do a query on a layer then use the function featureLayerName.Update(); to refresh. In javascript, I have something like this query.where = "argument" featureLayerName.selectFeatures(query, FeatureLayer.MODE_SNAPSHOT, function(results){ featureLayerName.refresh(); }); I did a queryCount and it returned the correct count, which tells me the query is working just fine. so I must be doing something wrong after I get the results. heres a fiddle the code in question is in the councilFilter() function. Thanks.
... View more
01-13-2015
09:50 AM
|
0
|
5
|
4272
|
POST
|
Hey guys, Fiddle; http://jsfiddle.net/jt7sox45/ I am trying to populate a grid, and I cant seem to get it to work. I know the data is being read properly (if you uncomment out line 454 an alert shows the data). Any ideas what I am doing wrong?
... View more
01-06-2015
07:37 AM
|
0
|
2
|
4296
|
POST
|
Great idea, but for some reason it doesnt work. on mesure I do: var graphic = new Graphic(evt.geometry, lineColor); map.graphics.add(graphic); lineColor is defined globally as: var lineColor = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, new Color([255,0,0]), 3 ) edit - jsfiddle link I commented out //var graphic = new Graphic(evt.geometry, lineColor); // map.graphics.add(graphic); in the measure-end, if you uncomment you see it works. put that code in measure and it does not work
... View more
12-30-2014
09:22 AM
|
0
|
0
|
534
|
POST
|
Thanks guys, I did try that and it worked but I still came across an issue. In the measure-end function, I use evt.geometry to convert the measurement into a graphic. I get a Cannot read property 'geometry' of undefined when I use the same code inside the function of the button. this gets me in the right direction, thanks for the replies!
... View more
12-30-2014
08:21 AM
|
0
|
3
|
534
|
POST
|
Hello, Im developing a measure tool app and would like to make it touch screen friendly. Is there anyway to call the measure-end function besides using a double click?
... View more
12-30-2014
07:29 AM
|
0
|
6
|
4480
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|