var noteIcons = {
"new": L.icon({
iconUrl: "<%= image_path 'new_note_marker.png' %>",
- iconSize: [22, 22],
- iconAnchor: [11, 11]
+ iconSize: [25, 40],
+ iconAnchor: [12, 40]
}),
"open": L.icon({
iconUrl: "<%= image_path 'open_note_marker.png' %>",
- iconSize: [22, 22],
- iconAnchor: [11, 11]
+ iconSize: [25, 40],
+ iconAnchor: [12, 40]
}),
"closed": L.icon({
iconUrl: "<%= image_path 'closed_note_marker.png' %>",
- iconSize: [22, 22],
- iconAnchor: [11, 11]
+ iconSize: [25, 40],
+ iconAnchor: [12, 40]
})
};
});
if (OSM.STATUS != 'api_offline' && OSM.STATUS != 'database_offline') {
- map.layersControl.addOverlay(noteLayer, I18n.t("browse.start_rjs.notes_layer_name"));
+// map.layersControl.addOverlay(noteLayer, I18n.t("browse.start_rjs.notes_layer_name"));
if (params.layers) setMapLayers(params.layers);
if (params.notes) map.addLayer(noteLayer);
if (marker)
{
marker.setIcon(noteIcons[feature.properties.status]);
- marker._popup.setContent(createPopupContent(
+ marker.setPopupContent(createPopupContent(
marker, feature.properties,
$(marker._popup._content).find("textarea").val()
));
{
marker = L.marker(feature.geometry.coordinates.reverse(), {
icon: noteIcons[feature.properties.status],
- opacity: 0.7
+ opacity: 0.9
});
marker.addTo(noteLayer).bindPopup(
var size = bounds.getSize();
if (size <= OSM.MAX_NOTE_REQUEST_AREA) {
- var url = "/api/" + OSM.API_VERSION + "/notes.json?bbox=" + bounds.toBBOX();
+ var url = "/api/" + OSM.API_VERSION + "/notes.json?bbox=" + bounds.toBBoxString();
if (noteLoader) noteLoader.abort();
minWidth: 320,
maxWidth: mapSize.y * 1 / 3,
maxHeight: mapSize.y * 2 / 3,
- offset: new L.Point(0, -3),
+ offset: new L.Point(0, -40),
autoPanPadding: new L.Point(60, 40)
};
}
var popupContent = createPopupContent(marker, feature.properties);
marker.setIcon(noteIcons[feature.properties.status]);
- marker._popup.setContent(popupContent);
+ marker.setPopupContent(popupContent);
}
}
});
newNote = L.marker(map.containerPointToLatLng(markerPosition), {
icon: noteIcons["new"],
- opacity: 0.7,
+ opacity: 0.9,
draggable: true
});