doubleclick on map marker zooms in or out to place

This commit is contained in:
rlx 2011-10-08 17:45:40 +00:00
parent 331d23012c
commit 2e9c22aa6d
2 changed files with 9 additions and 2 deletions

View file

@ -523,6 +523,10 @@ Ox.URL = function(options) {
parseBeyondSpan(); parseBeyondSpan();
} }
} else { } else {
if (!state.view) {
// set to default item view
state.view = self.options.views[state.type].item[0];
}
callback(state); callback(state);
} }
} }

View file

@ -84,14 +84,16 @@ Ox.MapMarker = function(options) {
} else { } else {
if (that.map.getKey() == 'meta') { if (that.map.getKey() == 'meta') {
that.map.options({selected: null}); that.map.options({selected: null});
} else if (that.map.getKey() == 'shift') {
that.map.zoomToPlace();
} else { } else {
that.map.panToPlace(); that.map.panToPlace();
} }
} }
} }
function dblclick() {
that.place.selected && that.map.zoomToPlace();
}
function dragstart(e) { function dragstart(e) {
} }
@ -225,6 +227,7 @@ Ox.MapMarker = function(options) {
that.add = function() { that.add = function() {
that.marker.setMap(that.map.map); that.marker.setMap(that.map.map);
google.maps.event.addListener(that.marker, 'click', click); google.maps.event.addListener(that.marker, 'click', click);
google.maps.event.addListener(that.marker, 'dblclick', dblclick);
return that; return that;
}; };