- var data = $(".details").data(),
- latLng = L.latLng(data.coordinates.split(","));
-
- if (!map.hasLayer(halo)) {
- halo = L.circleMarker(latLng, {
- weight: 2.5,
- radius: 20,
- fillOpacity: 0.5,
- color: "#FF6200"
+ var data = $(".details").data();
+
+ if (data) {
+ var hashParams = OSM.parseHash(window.location.hash);
+ map.addObject({
+ type: "note",
+ id: parseInt(id, 10),
+ latLng: L.latLng(data.coordinates.split(",")),
+ icon: noteIcons[data.status]
+ }, function () {
+ if (!hashParams.center) {
+ var latLng = L.latLng(data.coordinates.split(","));
+ OSM.router.withoutMoveListener(function () {
+ map.setView(latLng, 15, { reset: true });
+ });
+ }