1
0
Fork 0
forked from 0x2620/oxjs

shift click to join places, part 8

This commit is contained in:
rolux 2011-06-14 17:03:26 +02:00
commit 1e166359b8
2 changed files with 12 additions and 4 deletions

View file

@ -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: [],