From 461233e87b037b2280384d143768ce26884a7432 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 2 Apr 2012 17:33:54 +0200 Subject: [PATCH] in Ox.Map, use '=' and '!=' as operators for 'in between' and 'not in between' --- source/Ox.UI/js/Map/Ox.Map.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/source/Ox.UI/js/Map/Ox.Map.js b/source/Ox.UI/js/Map/Ox.Map.js index 45b27c4d..24774963 100644 --- a/source/Ox.UI/js/Map/Ox.Map.js +++ b/source/Ox.UI/js/Map/Ox.Map.js @@ -527,7 +527,7 @@ Ox.Map = function(options, self) { var place = getSelectedPlace(), country = Ox.getCountryByGeoname(place.geoname); Ox.extend(place, data); - Ox.print('addPlaceToPlaces, place name:', place.name) + //Ox.print('addPlaceToPlaces, place name:', place.name) self.options.selected = place.id; place.countryCode = country ? country.code : ''; Ox.Log('Map', 'addP2P', data, place); @@ -907,7 +907,7 @@ Ox.Map = function(options, self) { function mapChanged() { // gets called after panning or zooming - Ox.print('Map', 'mapChanged'); + //Ox.print('Map', 'mapChanged'); if (self.boundsChanged) { var bounds = self.map.getBounds(), southWest = bounds.getSouthWest(), @@ -939,13 +939,13 @@ Ox.Map = function(options, self) { keys: self.placeKeys, query: { conditions: Ox.merge([ - {key: 'lat', value: [south, north], operator: '-'} + {key: 'lat', value: [south, north], operator: '='} ], spansGlobe() ? [ - {key: 'lng', value: [-180, 180], operator: '-'} + {key: 'lng', value: [-180, 180], operator: '='} ] : crossesDateline() ? [ - {key: 'lng', value: [east, west], operator: '!-'} + {key: 'lng', value: [east, west], operator: '!='} ] : [ - {key: 'lng', value: [west, east], operator: '-'} + {key: 'lng', value: [west, east], operator: '='} ]), operator: '&' }, @@ -1129,7 +1129,7 @@ Ox.Map = function(options, self) { self.places.splice(Ox.getIndexById(self.places, place.id), 1); self.resultPlace && self.resultPlace.remove(); self.resultPlace = place; - Ox.print('removed place, place is now', place); + //Ox.print('removed place, place is now', place); place.marker.update(); place.rectangle.update(); } @@ -1141,7 +1141,7 @@ Ox.Map = function(options, self) { } function selectPlace(id, zoom) { - Ox.print('SELECT PLACE', id) + //Ox.print('SELECT PLACE', id) // id can be null (deselect) var place, selected = getSelectedMarker(); if (!self.loaded) { @@ -1189,7 +1189,7 @@ Ox.Map = function(options, self) { } } function select() { - Ox.print('select...', place) + //Ox.print('select...', place) place && place.select(); self.options.selected = id; setPlaceControls(place); @@ -1405,7 +1405,7 @@ Ox.Map = function(options, self) { that.resizeMap(); } else if (key == 'places') { // fixme: assumes !self.isAsync - Ox.print('MAP SET OPTIONS PLACES', value); + //Ox.print('MAP SET OPTIONS PLACES', value); addPlaces(); getMapBounds(function(mapBounds) { if (mapBounds) { @@ -1509,7 +1509,7 @@ Ox.Map = function(options, self) { that.value = function(id, key, value) { // fixme: should be like the corresponding List/TextList/etc value function - Ox.print('Map', 'Map.value', id, key, value); + Ox.Log('Map', 'Map.value', id, key, value); getPlaceById(id).options(key, value); if (id == self.options.selected) { if (key == 'name') {