Max Demars | 29 Aug 19:01 2014

OpenLayers.Control.Split not working the same as the example

Hi list,

I am following the split-feature example, but cannot make it works the same in my application.

[I have create a JsFiddle to show my code.][2]

In the fiddle you'll see a vectorLayer with one feature and a split control. However, the aftersplit event (that would tell how many features is in the layer after the split) is never called.

What is wrong with my code?

Thank you!

-Max Demars
Users mailing list
Peter Freimuth | 29 Aug 08:39 2014

problems with ol 2.11 and Cross

we have a problem with a OSM tile service in Openlayers 2.11 which shall replace the google background map for an application in china as google map does not work. As the App is running with https we needed a https enabled tile service and received it from a german service provider. But in this application the Tile Service doesn’t work due to the error: 
Image from origin '' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '' is therefore not allowed access

We can see the tiles being successfully loaded from the tile service in firebug but in the map we see only a bunch of broken image links. Its a standard OL OSM layer that works fine with outer test applications.
Any hint on what might cause this problem is very, very welcome.
Kind regards,

BlackBridge AG | Sitz Berlin | Amtsgericht Charlottenburg - Registergericht | HRB 152785 | Aufsichtsratsvorsitzender: David Westwood | Vorstand: Ryan Johnson
Users mailing list
Max Demars | 28 Aug 17:32 2014

Adding vertex on click


I would like to know if someone has a solution for a function that allow user to create a vertex by clicking on a vertice of a feature in the modifyFeature control.

I would prefer to create the vertex manually than letting the modifyFeature control doing it automatically for performance issue. It could take very long time to create all vertices for very complex features, and it even make the browser crash sometimes.

Thanks for any suggestions or comments.

-Max Demars
Users mailing list
Morescratch | 27 Aug 18:52 2014

Edit KML attributes on feature insert

Hi all,

I have a unique requirement where I need to change the attribute
names/values when a KML file is loaded. I have done this successfully using
the read function in OpenLayers.Format.KML... but it is SLOW. Is there a
faster/more efficient way of doing this?

Here is my code:

read: function( nodes ) {

  var items = this.getElementsByTagNameNS( nodes, "*", "Placemark" ),
       i, len, attributes, features = [];										

  for ( len = items.length; i !== len; i += 1 ) {
    row = items[ i ];
    feature = this.parseFeature( row );

    // Parse and remap the attributes to user defined keys
    attributes = {};
    attributes[ "new key" ] =[ "old key" ];
    feature.attributes = atts;
    features.push( feature );
  return features;

Thank you in advance.

View this message in context:
Sent from the OpenLayers Users mailing list archive at
Alexandre Dubé | 27 Aug 17:38 2014

WPS Execute request - the ResponseForm

Hi list,

   I have questions about the XML produced by the WPSExecute format. I 
already asked the same questions on the Zoo mailing list since it's 
regarding a difference ResponseForm node their example page use from the 
one produced by OpenLayers WPSExecute format:

   What Zoo expect:



      <wps:Output mimeType="application/json">





   What OpenLayers WPSExecute format outputs:



      <ows:Identifier xmlns:ows="">Result</ows:Identifier>



   Unless the extra "Output" node gets added, Zoo throws an error: 
'Wrong RawDataOutput parameter, unable to fetch any result for the name 
your provided : "unknownIdentifier".'  So, my question is more a OGC:WPS 
oriented one: should openlayers output this extra node or not ?  An 
expert reading schemas should be able to tell more 
(, I get 
confused trying to understand it).

Thanks a lot,


Alexandre Dubé
T: +1 418-696-5056 #203
Alexandre Dubé | 27 Aug 16:08 2014

WPSExecute with a WFS reference using filter

Hi list,

   I would like to know if the WPSExecute format support references to a 
WFS query with a filter, something like the attached file (I manually 
created).  I'm using the WPSClient object, which is simple to use, and 
I'm currently overriding the WPSProcess 'setInputData' method in order 
to support having a OpenLayers.Protocol.WFS.v1 object defined as the 
'data' parameter value, which sets the input.reference accordingly as such:

         input.reference = {

             mimeType: "text/xml; subtype=wfs-collection/1.0",

             href: data.url,

             method: "POST",

             body: {

                 wfs: {

                     version: "1.0.0",

                     outputFormat: "GML2",

                     featureType: data.featureType




         if (data instanceof OpenLayers.Protocol.WFS.v1_1_0) {

             input.reference.mimeType = "text/xml; subtype=wfs-collection/1.1";

             input.reference.body.wfs.version = "1.1.0";


   The above produces the <wfs:GetFeature> with a single <wfs:Query> 
node.  What I need to figure out is how use the filters that are set in 
the protocol to produce the <ogc:Filter> to add to the query node.  Does 
OpenLayers support that ?  Any hint ?

   I'm using OpenLayers latest version from GitHub.



Alexandre Dubé
T: +1 418-696-5056 #203

Users mailing list
Amir Abou | 26 Aug 20:39 2014

Help with web-based 3D mapping using nVidia 3D vision

Hi folks,

I just started working on a very interesting project as part of my 
university research for 3D visualization of earth's surface in 3D (not 
3D modeling but real 3D!) using nVidia 3D vision in browser environment. 
I'm planning to use one of web-based javascript mapping platforms (like 
open layers or leafletjs) as a base and develop necessary modules for 3D 
visualization. I have all necessary data (2 image pairs for a test area 
created from satellite image and Digital Elevation Model) and looking 
for information on platform, modules and libraries you might know that 
can help me build this or even any already developed tool you know. I 
would also appreciate if you mention any document, resource or guide you 
can share or if you have any comment, advice or ideas.
In case you are interested in being part of this tiny but fun project, 
you can contact me via Email

PS: here is a demo of nVidia's tech on browser for those who have access 
to 3D glasses and graphics card (you should choose 3D vision tab in 
gallery and turn your 3D feature ON to see it):

Max Demars | 26 Aug 20:08 2014

Question about OpenLayers.Layer.Vector.addFeatures()

I have noticed that the addFeatures() of the OpenLayers.Layer.Vector add a lot of features and not just the feature that we pass to the function:

    var vectorLayer = new OpenLayers.Layer.Vector('Feature');

    var geoJson = new OpenLayers.Format.GeoJSON();
    var geojsonString = "{ "type": "MultiPolygon", "coordinates": [ [ [ [ -309443.24, 388111.57 ], [  -239422.23, 395845.01 ], [ -136320.43, 389768.69 ], [ -136320.43, 389768.69 ], [ -134666.39, 239616.41 ], [ -308616.22 ,238788.81 ], [ -309443.24, 388111.57 ] ] ] ] }"
    console.log(vectorLayer.features) // returns 13 objects instead of 1

13 features were added to vectorLayer.features. The first object is the geoJson feature and the others are some points vector. Is this normal? If yes, is it possible to not add those additional features because render time is affected.

Users mailing list
dalsa90 | 24 Aug 12:21 2014

Include WMS in openlayers map

Hello everybody, 

I am pretty new with OpenLayers and I have some very easy questions on how
to include a WMS map I am interested in, inside my application.

I'd like to add a map coming from Torino (Italy) website

for instance the section "CARTOGRAFIA DI BASE".

I have used this code I have found 

  <title>OpenLayers Example</title>

      <div style="width:100%; height:100%" id="map"></div>


and it works fine, but when I substitute the url of this map with the one I
am interested in, then nothing happens ( for instance the url

I can only see an image with empty boxes. I think this is due to the fact I
have to make a request to other data I can see in the same Torino website (
getcapabilities or metadato ) but how is this possible in openlayers? 

Thank you very much for your help!

Kind regards


View this message in context:
Sent from the OpenLayers Users mailing list archive at
Users mailing list
Users <at>
harko33 | 22 Aug 20:35 2014

Error when parsing array with OpenLayers and Protocol.HTTP()

I'm trying to send a JSON file to my Node.js app via Protocol.HTTP. The file
is correctly sent, but I can't access to an array. Here is the relevant code

Client side

        var vectorProtocol = new OpenLayers.Protocol.HTTP({
                        url: '/getcoords',
                        format: vectorFormat,
                        readWithPOST: true,
                        params: {
                            "code_company": "8501",
                            "data_company": [
                                    "origin": "2013P00109",
                                    "type": "LJ",
                                    "naf": "5610A",
                                    "origin": "2013P00110",
                                    "type": "FJ",
                                    "naf": "5481"

Server side, I try to build an array with only the "origin" field of my
array "data_company":

    function getCoords(params, callback) {
          var arrOrigin = {
             return d.origin;

And I get this error :

> TypeError: Object [object Object] has no method "map"

It seems that my "data_company" is not recognized as an array but as an
object. I tried to JSON.parse(params) before but I get another error :

> SyntaxError: Unexpected token o

Anyway, I'm stuck. Do you have any clue to help me to solve this ?


View this message in context:
Sent from the OpenLayers Users mailing list archive at
Diego Guidi | 22 Aug 08:33 2014

Re: Force openlayers to not use browser cache for tiles refresh

On Thu, Aug 21, 2014 at 7:45 PM, Max Demars <burton449geo@...> wrote:
> Is there a way to force the map to not use that cache?

See my answer here:

Diego Guidi