Doku zu Openlayers
Florian Lohoff
f at zz.de
Do Mai 20 15:12:49 CEST 2010
On Thu, May 20, 2010 at 10:00:26AM +0200, Hans-Josef Hoffmann wrote:
> @Flo: Hallo Flo, bitte sende den Pointer über die Dokumentation der
> Openlayers Java-Script Bibliothek, wie gestern auf dem OSM-Meeting
> besprochen.
Es ging ja darum overlays ueber die karte zu bekommen die kein icon sind:
this.parser = new OpenLayers.Format.GeoJSON();
this.vector = new OpenLayers.Layer.Vector("data");
[... AJAX mit callback result.responseText ...]
var features = this.parser.read(result.responseText);
for (var i = 0; i < features.length; i++) {
features[i].style = {
label: "Test",
fontSize: 17,
fontColor: 'black',
fontWeight: 'bolder'
strokeColor: "#00550c",
strokeWidth: 4,
strokeOpacity: 0.7,
strokeLinecap: 'butt'
};
}
this.vector.addFeatures(features);
Das was ich da ueber AJAX hole als JSON sieht so aus - Die koordinate
recode ich in meinem cgi schon auf Google SRS 900913 d.h. mercator.
Bzw das macht bei mir die postgis datenbank.
{
"features" : [
{
"geometry" : {
"coordinates" : [
[
"932583.665011466",
"6770830.07837031"
],
[
"932327.89734942",
"6770770.21132515"
],
[
"932219.828387758",
"6770745.20529928"
]
],
"type" : "LineString"
},
"id" : "24382328",
"type" : "Feature",
"properties" : {
"speed" : "70",
"highway" : "tertiary"
}
},
],
"type" : "FeatureCollection"
}
--
Florian Lohoff f at zz.de
"Es ist ein grobes Missverständnis und eine Fehlwahrnehmung, dem Staat
im Internet Zensur- und Überwachungsabsichten zu unterstellen."
- - Bundesminister Dr. Wolfgang Schäuble -- 10. Juli in Berlin
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-signature
Dateigröße : 827 bytes
Beschreibung: Digital signature
URL : <http://gt.owl.de/pipermail/osm/attachments/20100520/62a82762/attachment.pgp>
Mehr Informationen über die Mailingliste OSM