shift click to join places, part 8
This commit is contained in:
parent
fc9fa56e9c
commit
1e166359b8
2 changed files with 12 additions and 4 deletions
|
@ -516,7 +516,9 @@ Ox.ListMap = function(options, self) {
|
|||
})
|
||||
.css({float: 'left', margin: '4px 2px 4px 4px'})
|
||||
.bindEvent({
|
||||
click: self.$map.newPlace
|
||||
click: function() {
|
||||
self.$map.newPlace();
|
||||
}
|
||||
})
|
||||
.appendTo(self.$placeStatusbar);
|
||||
|
||||
|
|
|
@ -54,9 +54,15 @@ Ox.MapMarker = function(options) {
|
|||
function click() {
|
||||
if (!that.place.selected) {
|
||||
if (that.map.getKey() == 'shift') {
|
||||
var bounds = that.map.getSelectedPlace().bounds.union(that.place.bounds),
|
||||
southWest = bounds.getSouthWest(),
|
||||
northEast = bounds.getNorthEast();
|
||||
var place = that.map.getSelectedPlace(),
|
||||
bounds = new google.maps.LatLngBounds(
|
||||
new google.maps.LatLng(place.south, place.west),
|
||||
new google.maps.LatLng(place.north, place.east)
|
||||
),
|
||||
southWest, northEast;
|
||||
bounds = bounds.union(that.place.bounds);
|
||||
southWest = bounds.getSouthWest();
|
||||
northEast = bounds.getNorthEast();
|
||||
that.map.newPlace(new Ox.MapPlace({
|
||||
// fixme: duplicated, see Ox.Map.js
|
||||
alternativeNames: [],
|
||||
|
|
Loading…
Reference in a new issue