[OpenLayers-Users] Highlighting Selected Tract
Gery .
gamejihou at hotmail.com
Mon Mar 4 14:26:33 PST 2013
Definitely Jerome, you should follow Phil's idea, I think your problem is that your features are not properly called/filtered, I think the best is to use a protocol and play with it (use it inside a function and use return), so at the end you can display one feature at the time, but having all the features already called, so you use a for loop to display them.
Sent from my iBath
On Mar 4, 2013, at 22:57, "Jerome A. Wendell" <jawendell at digitalmapping.com> wrote:
Phil,
Thanks again for your reply. The information that you have provided is very
helpful. I will dig into this issue further and see if I can determine what
is going on.
Thanks.
-----Original Message-----
From: Phil Scadden [mailto:p.scadden at gns.cri.nz]
Sent: Monday, March 04, 2013 4:52 PM
To: jawendell at digitalmapping.com
Cc: openlayers-users at lists.osgeo.org
Subject: Re: [OpenLayers-Users] Highlighting Selected Tract
On 5/03/2013 10:13 a.m., Jerome A. Wendell wrote:
> under the DOM tab, and in fact do not see the addFeatures. I guess
> the addFeatures should show up under the control?
Nope. They should be part of the map div, under the selectlayer. First thing
though is step through code, make sure addFeatures is actually called. If
you use the lib version of OL, you can step into addFeatures as well.
The kind of thing you are doing, (point select, polyselect) I do with
DrawFeature controls. I have featureadded event handler attached which
creates a spatial filter. I read a WFS protocol with this filter and call
addFeatures (and all the other logic) on the return. The method gives me a
single point to process spatial returns and control over the fiter. There
are probably easier ways but as a application get a lot of function added to
it, control gets more important.
--
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, Private
Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list