[OpenLayers-Users] change GML url

Arnd Wippermann arnd.wippermann at web.de
Sat May 4 09:47:16 PDT 2013


Hi,

Try this

myVectorLayer.refresh({url: newUrl});

http://permalink.gmane.org/gmane.comp.gis.openlayers.user/16902

Arnd
 

________________________________

Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Gaëtan
Palka
Gesendet: Freitag, 3. Mai 2013 15:19
An: openlayers-users
Betreff: [OpenLayers-Users] change GML url


hi,


I work with GML data and Style in Openlayers. My application is composed of
two lists (one for style and one for data). I want that style change when
the user change the selected value in the first list and that the data
change when the user change the selected value in the second list.


For the style it is ok with : 
function changeBySelect(layerToRedraw) {
    layerChoose = map.getLayersByName(layerToRedraw);
    if (layerToRedraw == "bati") {
        if (document.getElementById("choix_alea").selectedIndex == 0) {
            var style_bati = new OpenLayers.Style();
            style_bati.addRules([rule_bati_sans]);
        }
       ...
    layerChoose[0].styleMap=style_bati;


but I don't find the solution to change the GML data url. Do you have an
idea ?


Thank you.




More information about the Users mailing list