ThinkGeo.com    |     Documentation    |     Premium Support

Programatically select a feature in the EditLayer

Hello all,


In my application, to edit a feature, the user point it in a DynamicLayer. 

The feature is then copied to the EditLayer to allow the edition.


To make sure that the user doesn't have to select the feature another time, I would like to automarically select the feature in the EditLayer. How can I programatically do this ?


Thanks


Nicolas


PS : The layers contain a lot of polygons and for performance reasons, it's not possible to load them directly in the EditLayer.



Nicolas, 


Here is a sample for you showing how to implement that. We have some issues with current version and this sample is based on the new one which will be released in a couple days. You cannot run it until maybe early next week.
 
Generally, what we need to do is override the javascript function OnMapCreated(map) and set the SelectFeature property to the one you want. Have a look the aspx file in the sample for detail. 
 
Ben.

117-ClickAndEditForNicolas.zip (7.31 KB)

Thanks again. 
 Just another question relative to the javascript API. 
 Do you plan to provide, or do you have, a documentation for the clientside API? 
  
 Nicolas 


Nicolas, 



We don't have that for now but that's already on the schedule and we will work on it soon. 



Ben