Skip to main content
replaced http://gis.stackexchange.com/ with https://gis.stackexchange.com/
Source Link

Edit: I found a similar questionquestion that restates my own demand, that is a single GeoJSON file backing multiple Vector Layers. But, there is no code to understand how this is being done.

Edit: I found a similar question that restates my own demand, that is a single GeoJSON file backing multiple Vector Layers. But, there is no code to understand how this is being done.

Edit: I found a similar question that restates my own demand, that is a single GeoJSON file backing multiple Vector Layers. But, there is no code to understand how this is being done.

added 1399 characters in body
Source Link
Nikolaos
  • 51
  • 1
  • 3

Well, it has been a month without some answer, so I suppose my question needs some refrase:

What I really need with OL is filling a number of overlay layers with features by reading once (in a period) a GeoJSON file.

I get each half-an-hour a different GeoJSON file, which corresponds to a lot of point features, each with a pair of coordinates and some properties. For each one of the properties, I create one overlay layer in OpenLayers. Essentially, there are the same points in all layers, but a different property is hightlighted for every layer.

The way I went so far, was reading the same GeoJSON file as many times as many are the layers. This way has been expressed in the first block of code above, at my first question one month ago: Each layer manages to get its own features reading for itself from the PHP file, which produces a GeoJSON format output.

However, this way is not desirable, because of the too many independent calls to the webserver, while the layers display essentially the same thing; what's more, if the PHP file changes its output in the meantime of layers' reading, the displayed result is prone to confusion.

My question is therefore about another way of loading my features. I want to read once, in a period say half-an-hour, the GeoJSON (output from the PHP) and get all my layers filled from this.


Well, it has been a month without some answer, so I suppose my question needs some refrase:

What I really need with OL is filling a number of overlay layers with features by reading once (in a period) a GeoJSON file.

I get each half-an-hour a different GeoJSON file, which corresponds to a lot of point features, each with a pair of coordinates and some properties. For each one of the properties, I create one overlay layer in OpenLayers. Essentially, there are the same points in all layers, but a different property is hightlighted for every layer.

The way I went so far, was reading the same GeoJSON file as many times as many are the layers. This way has been expressed in the first block of code above, at my first question one month ago: Each layer manages to get its own features reading for itself from the PHP file, which produces a GeoJSON format output.

However, this way is not desirable, because of the too many independent calls to the webserver, while the layers display essentially the same thing; what's more, if the PHP file changes its output in the meantime of layers' reading, the displayed result is prone to confusion.

My question is therefore about another way of loading my features. I want to read once, in a period say half-an-hour, the GeoJSON (output from the PHP) and get all my layers filled from this.

Supply more information
Source Link
Nikolaos
  • 51
  • 1
  • 3

Edit: I found a similar question that restates my own demand, that is a single GeoJSON file backing multiple Vector Layers. But, there is no code to understand how this is being done.

Edit: I found a similar question that restates my own demand, that is a single GeoJSON file backing multiple Vector Layers. But, there is no code to understand how this is being done.

Source Link
Nikolaos
  • 51
  • 1
  • 3
Loading