in Ox.Map, use '=' and '!=' as operators for 'in between' and 'not in between'
This commit is contained in:
parent
241f0bc064
commit
461233e87b
1 changed files with 11 additions and 11 deletions
|
@ -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') {
|
||||
|
|
Loading…
Reference in a new issue