[OpenLayers-Users] geojson: get list of all element-names

Jan Tappenbeck osm at tappenbeck.net
Thu Aug 9 06:41:07 PDT 2012


hi !

i include a geojson-file by

	lyStreet = new OpenLayers.Layer.Vector("Strassen und Wege", {
//	                                                   style: {
	                                                   styleMap : new OpenLayers.Style({
													     strokeColor: "yellow",
														 strokeWidth: 8,
														 strokeOpacity: 0.6,
														 cursor: "pointer",
														 display:"none"
													   }),
                                                        strategies: [new OpenLayers.Strategy.Fixed()],
                                                        projection: new OpenLayers.Projection("EPSG:4326"),
                                                        protocol: new OpenLayers.Protocol.HTTP({
							                               url: "../json/street_hl.json",
                                                            format: new OpenLayers.Format.GeoJSON()
                                                        })



and the file is define by

     "type": "FeatureCollection",
     "features": [
      {
          "type": "Feature",
          "properties": {"name": "\"Siedlerweg\""},
          "geometry": {
            "type": "MultiLineString",
            "coordinates": [
    ....

can anybody tell me how to get all the values of the property "name" ?

regards Jan :-)




More information about the Users mailing list