I'm trying to follow this example:
http://openlayers.org/dev/examples/SLDSelect.html
When I click on the point, its color should be changed, here is a piece of
my code:
control = new OpenLayers.Control.SLDSelect(
OpenLayers.Handler.Click,
{
//displayClass: 'olControlClick',
layers: [city]
}
)
map.addControl(control);
control.activate();
Still can't figure out what's the point of displayClass. and how to assign
the new color.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/SLD-based-selection-on-WMS-layers-How-to-set-the-new-style-of-clicked-point-tp5051399.html
Sent from the GeoServer - User mailing list archive at Nabble.com.
On Sun, May 5, 2013 at 1:53 PM, Shadin <shadin__a@anonymised.com> wrote:
I'm trying to follow this example:
http://openlayers.org/dev/examples/SLDSelect.html
When I click on the point, its color should be changed, here is a piece of
my code:
control = new OpenLayers.Control.SLDSelect(
OpenLayers.Handler.Click,
{
//displayClass: 'olControlClick',
layers: [city]
}
)
map.addControl(control);
control.activate();
Still can't figure out what's the point of displayClass. and how to assign
the new color.
I believe you'll get answers quicker if you ask on the OpenLayers users
mailing list
Cheers
Andrea
--
GeoServer training in Milan, 6th & 7th June 2013! Visit
http://geoserver.geo-solutions.it for more information.
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
Agreed that is for OL list, but displayClass is a CSS reference. In your CSS, you create a class (eg olControlClick) with the style you want. You pass the name of this class in displayClass.
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.