Reem | 28 Apr 14:30 2015

refresh vector layer

I use openlayers with geoservers layers .

currently, my problem is with refreshing vector layer that used WFS protocl
and cql_filter,
as below:

Layer2 = new OpenLayers.Layer.Vector("layer2", { 
protocol:new OpenLayers.Protocol.WFS.v1_1_0({          
                   url: GeoServerURL,				   
                   featureType: "layer2", 
				   featureNS: "", 
				   srsName: "EPSG:3857", 
                   version: "1.1.0", 
                   extractAttributes: true, 
                   isBaseLayer: false, 
                   visibility: true 
	 maxExtent: new OpenLayers.Bounds(-180, -90, 180,
         displayOutsideMaxExtent: true, 
         displayInLayerSwitcher: false 


    filter: c_filter,   					 
    callback: processTheQuery , 
(Continue reading)

joaorodr84 | 27 Apr 20:23 2015

Re: Like query with “singleChar” does not work correctly in OpenLayers.StyleMap


Indeed, it works. Thanks for the tip. But, I am still wondering why it
doesn't work directly with the rule. It should work. So, my question remans

Thanks anyway. ;)


View this message in context:
Sent from the OpenLayers Users mailing list archive at
Users mailing list
Users <at>
joaorodr84 | 27 Apr 12:59 2015

Like query with “singleChar” does not work correctly in OpenLayers.StyleMap

I am working on a GIS API, based on OpenLayers 2.13. I want to represent my
data using WMS and Vector layers.

Recently, I have started developing the support for LIKE queries in filters
and in style maps.

*WMS (green stroke color)*

For WMS layers, the filter is quite simle, as you may know. It must respect
the CQL syntax, for example: `"STATE_NAME LIKE 'N%'"` would match all states
which name starts with an "N".

For the style map, I build a little structure with OpenLayers,
Style/Rule/Filter, I convert it to an SLD BODY using this `var sld = new
OpenLayers.Format.SLD().write(structure)`, and it works fine.

*Vector (default orange fill color)*

As for Vector layers, the filter is an instance of OpenLayers.Filter, which
is easy to build and works fine.

Here come the strange, and maybe tricky, part. for the style map, it does
not work. I build an OpenLayers.StyleMap, using OpenLayers
Style/Rule/Filter, and I get wrong results. What really bothers me is that I
use a given OpenLayers.Filter as filter and it works fine. But when I use
the same instance of OpenLayers.Filter inside a Rule, inside a Style, inside
a StyleMap, I get wrong results.


(Continue reading)

Thomas Wagner | 24 Apr 13:29 2015

Streched Map if Sidebar.display=none

Hi  <at> all,

i'm trying to build a webpage using ol V3.4.

My side has two major Div-Tags:
  - map:  This is where the map is build in.
  - sidebar: Sidebar with some HTML content.
I created a sidebar switch (id=sidebarbtn).
On click this Button does "close" the sidebar by setting sidebar-display =
AND by setting map-style.left = '0px.
And there is the problem: After this operation my map is streched.

Here is the source:

  function sideBarSwitch(){
      var mapdiv = document.getElementById('map');
      var sidediv = document.getElementById('sidebar');
      var btn = document.getElementById('sidebarbtn');

      if( != 'none'){ = 'none'; = '0px';
	btn.innerHTML = '&darr;';
      } else { = 'block'; = '520px';
(Continue reading)

ar_gaeta | 21 Apr 11:17 2015

Re: Safari: problem interact with WFS layers

Hi, yes I'm testing Safari for Windows...
That might be a problem testing on other platform 'cause I don't have any
apple device, but I would like my WebGis working well on Safari platform
I will try how I can do and I will let you know.
Thanks very much for this tip.

View this message in context:
Sent from the OpenLayers Users mailing list archive at
ar_gaeta | 13 Apr 17:30 2015

Safari: problem interact with WFS layers

Hi all, I've made a webgis based on Openlayers 2.13 and data in WFS by both
Mapserver 6 and Tinyows 1.0.0rc2.
I don't have any problem on other browsers (Chrome, Firefox, even IE11), but
on Safari I'm not able to interact with the elements of my layers, correctly
displayed on map but on which I can't do "select" neither "hoover".
Someone else have experienced this problem?
Thanks for anyone that could help, if you need more details let me know.

View this message in context:
Sent from the OpenLayers Users mailing list archive at
Max Demars | 30 Mar 14:38 2015

OL2 Bounds validation


First, is this the correct list for OL2 questions?

I would like to know if there is a way to validate OpenLayers.Bounds on creation. I have noticed that Bounds would be created even if we pass the bounds mins and maxs in wrong order or even if mins and maxs have the same values.

For instances, these wont return error:

bounds = new OpenLayers.Bounds.fromArray([0,0,0,0]);

bounds = new OpenLayers.Bounds.fromArray([1,1,-1,-1]);

I have noticed that these erronous bounds objects will have hazardous behaviour if we transform them to Features and play with them with TransformFeatures control or else.

Does OL2 have a method to validate Bounds or should I test values and order manually?

Thank you,

Maxime Demers

Users mailing list
Steve.Toutant | 24 Mar 16:07 2015

Allow Pan while Drawing

I would like to be able to draw a circle while Pan control is activated. I tried this example

This example is not working using Draw box with Allow Pan while Drawing active.

Is it really possible using OL 2.13.1 to allow Pan while Drawing?


Users mailing list
utkarsha | 23 Mar 07:29 2015

Regarding fetching area details

How can i get country, state, city & particular area within the city
information using open layer or open layer api?
I need to show details such as country, state, city or area within city
after zooming map in example stated below:

Kindly waiting for reply.

Thanks in advance

View this message in context:
Sent from the OpenLayers Users mailing list archive at
openDEM | 22 Mar 17:06 2015

User WMS Styling on demand - very basic example


Here is a very basic example for user styling on demand via wms-sld: <>  

No error handling or value check is implemented.



View this message in context:
Sent from the OpenLayers Users mailing list archive at
Roel De Nijs | 10 Mar 18:06 2015

GetFeature control on a mobile device

Hi list,


In our application we have a WMS layer and a GetFeature control which displays on click some info about the features on the mouse position (using a custom protocol). Works really nice in the 3 main browsers (IE11, FireFox and Chrome). But when we test the application on a mobile device, the tap/touch event doesn’t trigger the click-event of the GetFeature control (and thus no request is sent, no info is shown). We tried it on several devices (iPad, Samsung S5), but it doesn’t work on any of them.


What’s the best approach/solution to get this working in OpenLayers 2.13.1? We have already tried to manually add the TouchNavigation control, but this didn’t work either. Upgrading to OL3 is currently not an option.


The GetFeature control:

mapControls.push(new OpenLayers.Control.GetFeature({

id : "feature",

autoActivate : true,

click : true,

clickTolerance : 10,

protocol : customProtocol



Many thanks!

Kind regards,

Roel De Nijs

Senior Java Developer

Volg Aquafin op Facebook | Twitter | YouTube | LinkedIN

Disclaimer: zie   P Denk aan het milieu. Druk deze mail niet onnodig af.
Users mailing list