Compare commits
No commits in common. "bdb416ac113268605cd276578114ea2ebe9d12d6" and "ae2b1854aab0517e4ab2d58b96e5e8317aca96e3" have entirely different histories.
bdb416ac11
...
ae2b1854aa
2 changed files with 1 additions and 11 deletions
|
@ -67,7 +67,7 @@ Ox.LeafletMapMarker = function(options) {
|
||||||
new L.LatLng(place.south, place.west),
|
new L.LatLng(place.south, place.west),
|
||||||
new L.LatLng(place.north, place.east)
|
new L.LatLng(place.north, place.east)
|
||||||
);
|
);
|
||||||
bounds = bounds.extend(that.place.bounds);
|
// bounds = bounds.union(that.place.bounds);
|
||||||
southWest = bounds.getSouthWest();
|
southWest = bounds.getSouthWest();
|
||||||
northEast = bounds.getNorthEast();
|
northEast = bounds.getNorthEast();
|
||||||
that.map.newPlace(new Ox.LeafletMapPlace({
|
that.map.newPlace(new Ox.LeafletMapPlace({
|
||||||
|
|
|
@ -45,21 +45,11 @@ Ox.LeafletMapPlace = function(options) {
|
||||||
|
|
||||||
function update(updateMarker) {
|
function update(updateMarker) {
|
||||||
// console.log('foo', that.north, that.east, that.south, that.west);
|
// console.log('foo', that.north, that.east, that.south, that.west);
|
||||||
if (that.east < that.west) {
|
|
||||||
if (that.west > 170) {
|
|
||||||
that.west -= 360
|
|
||||||
//console.log(that.geoname, '<< west', that.west+360, '=>', that.west)
|
|
||||||
} else {
|
|
||||||
that.east += 360
|
|
||||||
//console.log(that.geoname, '>> east', that.east-360, that.east)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
that.points = {
|
that.points = {
|
||||||
ne: new L.LatLng(that.north, that.east),
|
ne: new L.LatLng(that.north, that.east),
|
||||||
sw: new L.LatLng(that.south, that.west)
|
sw: new L.LatLng(that.south, that.west)
|
||||||
};
|
};
|
||||||
console.log('points', JSON.stringify(that.points, null, 2));
|
console.log('points', JSON.stringify(that.points, null, 2));
|
||||||
|
|
||||||
that.bounds = new L.latLngBounds(that.points.sw, that.points.ne);
|
that.bounds = new L.latLngBounds(that.points.sw, that.points.ne);
|
||||||
that.center = that.bounds.getCenter();
|
that.center = that.bounds.getCenter();
|
||||||
that.lat = that.center.lat;
|
that.lat = that.center.lat;
|
||||||
|
|
Loading…
Reference in a new issue