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'})
|
.css({float: 'left', margin: '4px 2px 4px 4px'})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
click: self.$map.newPlace
|
click: function() {
|
||||||
|
self.$map.newPlace();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.appendTo(self.$placeStatusbar);
|
.appendTo(self.$placeStatusbar);
|
||||||
|
|
||||||
|
|
|
@ -54,9 +54,15 @@ Ox.MapMarker = function(options) {
|
||||||
function click() {
|
function click() {
|
||||||
if (!that.place.selected) {
|
if (!that.place.selected) {
|
||||||
if (that.map.getKey() == 'shift') {
|
if (that.map.getKey() == 'shift') {
|
||||||
var bounds = that.map.getSelectedPlace().bounds.union(that.place.bounds),
|
var place = that.map.getSelectedPlace(),
|
||||||
southWest = bounds.getSouthWest(),
|
bounds = new google.maps.LatLngBounds(
|
||||||
northEast = bounds.getNorthEast();
|
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({
|
that.map.newPlace(new Ox.MapPlace({
|
||||||
// fixme: duplicated, see Ox.Map.js
|
// fixme: duplicated, see Ox.Map.js
|
||||||
alternativeNames: [],
|
alternativeNames: [],
|
||||||
|
|
Loading…
Reference in a new issue