+ function startMarker() {
+ $("#add_marker").html(I18n.t('export.start_rjs.click_add_marker'));
+
+ if (!markerLayer) {
+ markerLayer = new OpenLayers.Layer.Vector("",{
+ displayInLayerSwitcher: false,
+ style: {
+ externalGraphic: OpenLayers.Util.getImageLocation("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 });
+ }