Help Modifying Feature Selection Application

528
1
07-15-2014 12:07 AM
JohnPapageorgiou
New Contributor III

Hi,

I'm working on a webmap application in the ArcGIS JavaScript API.  I like the functionality of the sample found here: Select with Feature Layer | ArcGIS API for JavaScript‌, however, I would like to combine it with some other capabilities.  One of those is the geoLocation.  The problem is that whenever the query is executed the GPS point disappears.  I'm not sure if it is because it is buried under the buffer graphic that is drawn, or the it is cleared in the process of all graphics being cleared before the query is executed.  Is it possible to somehow redraw the GPS point generated by the geolocate tool: Geolocation | ArcGIS API for JavaScript‌.?  Or maybe loop the functionality of it so that it reappears  on top of the buffer? 

Thanks,

John

Tags (2)
0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

John,

  The Select with Feature Layer sample has this line:


map.graphics.clear();


and the Geolocate sample has this line:

map.graphics.add(graphic);

So basically they are counteracting one another. My advice would be to have the Select with Feature Layer sample use a graphics layer that you add to the map and not the maps default graphics layer or vice versa.

Robert

0 Kudos