I made a module retrieving data with geodata. The import feature allows to create a file in geojson. So, i'd like to display the points and the data without using Views, only openlayers module. I saw the layer example provided with the module : Example GeoJSON, "Picture This", displaying a marker with the given raw geojson data provided. In the Layer section, I tried to use the URL field instead of the raw data field to provide a link to my datafile, but when i use it on a map, only the last point is displayed.
I saw that in the example :
{
"type": "Feature",
"properties": {
"name": "Picture This",
"description": "Outside of the North Carolina Museum of Art."
},
"geometry": {
"type": "Point",
"coordinates": [
-78.702798,
35.809411
]
},
"crs": {
"type": "name",
"properties": {
"name": "urn:ogc:def:crs:OGC:1.3:CRS84"
}
}
}
but the "regular"geojson is a collection of such features :
{ "type": "FeatureCollection", "features": [
{
"type": "Feature",
"properties": {"name": "point1", "description": "desc of 1"},
"geometry": {"type": "Point", "coordinates": [-78, 35]
}
},
{
"type": "Feature",
"properties": {"name": "point2", "description": "desc of 2"},
"geometry": {"type": "Point", "coordinates": [-79, 34]
}
}
]}
So, since i have more than 1 point i used the second version, and i only get the last point showing when i use this overlay on a map.
Is there something special to do to display several point or shapes (from a layer) using that technique : i'd like to avoid using Views or any other plugins for this.
I've read https://www.drupal.org/node/1481374 and other generic openlayer Drupal 7 tutorials, but i haven't found any help for this kind of problem. Thanks in advance