Hallöchen,
ich hänge mal wieder bei den simpelsten Dingen fest, die ich schonmal hinbekommen habe - und erfolgreich wieder vergessen habe.
Gegeben sei beispielsweise folgender Code:
markerstyle = {graphicWidth:40, graphicHeight:40, graphicXOffset: 0, graphicYOffset:-35, externalGraphic:'arrow.png', rotation: 0};
marker = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(0,0).transform(map.displayProjection,map.projection),null,markerstyle);
markerstyleOutside2 = {fillColor: '#5EFF24', pointRadius: 20,fillOpacity: 0.4,strokeColor: '#5EFF24', strokeWidth:4,strokeOpacity: 0.8};
markerOutside2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(0,0).transform(map.displayProjection,map.projection),{title:'Wegpunkt ',description:'Geschwindigkeit: km/h<br><a href=http://maps.google.de/maps?f=q&source=s_q&hl=de&geocode=&q=54.3091+13.0885&sll=&sspn=&ie=UTF8&t=h&z=16&iwloc=near target=_blank>in google Maps aufrufen</a>'},markerstyleOutside2);
markerstyleInside2 = {fillColor: '#5EFF24', pointRadius: 10,fillOpacity: 0.2,strokeColor: '#5EFF24', strokeWidth:2 };
markerInside2 = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(0,0).transform(map.displayProjection,map.projection),null,markerstyleInside2);
markerlayer.addFeatures([markerInside2]);
markerlayer.addFeatures([markerOutside2]);
Es handelt sich dabei um 2 Kreise, die zusammen einen Marker darstellen.
Ich möchte eigentlich, dass bei Klick ein Popup erscheint.
Ich hatte das Ganze schonmal soweit, dass ein Popup erschien mit dem Text, den ich oben hinter {title: … zu stehen hatte. Nur leider weiss ich nicht mehr, wie das ging.
Hat da jemand einen Tip für mich?
Wäre super dankbar