doubleclick on map marker zooms in or out to place
This commit is contained in:
parent
331d23012c
commit
2e9c22aa6d
2 changed files with 9 additions and 2 deletions
|
@ -523,6 +523,10 @@ Ox.URL = function(options) {
|
|||
parseBeyondSpan();
|
||||
}
|
||||
} else {
|
||||
if (!state.view) {
|
||||
// set to default item view
|
||||
state.view = self.options.views[state.type].item[0];
|
||||
}
|
||||
callback(state);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -84,14 +84,16 @@ Ox.MapMarker = function(options) {
|
|||
} else {
|
||||
if (that.map.getKey() == 'meta') {
|
||||
that.map.options({selected: null});
|
||||
} else if (that.map.getKey() == 'shift') {
|
||||
that.map.zoomToPlace();
|
||||
} else {
|
||||
that.map.panToPlace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function dblclick() {
|
||||
that.place.selected && that.map.zoomToPlace();
|
||||
}
|
||||
|
||||
function dragstart(e) {
|
||||
|
||||
}
|
||||
|
@ -225,6 +227,7 @@ Ox.MapMarker = function(options) {
|
|||
that.add = function() {
|
||||
that.marker.setMap(that.map.map);
|
||||
google.maps.event.addListener(that.marker, 'click', click);
|
||||
google.maps.event.addListener(that.marker, 'dblclick', dblclick);
|
||||
return that;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue