[OpenLayers-Dev] Metadata inside a JSON

toni hernández tonidelacalle at gmail.com
Tue Jul 20 11:31:14 EDT 2010


hi all,

I have a map with lots of layers. Each layer has its own style. The map
application gets each layer from a web-service that some else has developed
and can not be modified (I guess).

I thouht I could put any kind of data in a json file, so I tried this:

{
"type": "FeatureCollection",
"name": "Mapa de la Internacionalitat",
"minScale":"whatever",
"maxScale":"whatever",

//and then features and its properties?
"features": [
...
]
}

Now I have realized that atributes "name", "minScale" and "maxScale" are not
available from the layer object. I can only get the features properties.

Is it possible to read first the data of the layer, then create the layer
and finally add the features?
How could / should I do that?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20100720/242b9a4e/attachment.html


More information about the Dev mailing list