- markerLayer = new OpenLayers.Layer.Vector("",{displayInLayerSwitcher: false});
- markerControl = new OpenLayers.Control.DrawFeature(markerLayer, OpenLayers.Handler.Point);
- map.addLayer(markerLayer);
- map.addControl(markerControl);
- markerLayer.events.on({"featureadded": endMarker});
+ markerLayer = new OpenLayers.Layer.Vector("",{
+ displayInLayerSwitcher: false,
+ style: {
+ externalGraphic: OpenLayers.Util.getImagesLocation() + "marker.png",
+ graphicXOffset: -10.5,
+ graphicYOffset: -25,
+ graphicWidth: 21,
+ graphicHeight: 25
+ }
+ });
+ map.addLayer(markerLayer);
+
+ markerControl = new OpenLayers.Control.DrawFeature(markerLayer, OpenLayers.Handler.Point);
+ map.addControl(markerControl);
+
+ markerLayer.events.on({ "featureadded": endMarker });