1
0
Fork 0
forked from 0x2620/oxjs

some listmap fixes

This commit is contained in:
rolux 2011-05-30 14:06:58 +02:00
commit 5e54f5394d
3 changed files with 16 additions and 8 deletions

View file

@ -176,6 +176,11 @@ Ox.Map = function(options, self) {
self.isAsync = Ox.isFunction(self.options.places);
self.mapHeight = getMapHeight();
self.minZoom = getMinZoom();
self.placeKeys = [
'id', 'name', 'alternativeNames', 'geoname', 'countryCode', 'type',
'lat', 'lng', 'south', 'west', 'north', 'east', 'area',
'editable'
],
self.scaleMeters = [
50000000, 20000000, 10000000,
5000000, 2000000, 1000000,
@ -778,11 +783,7 @@ Ox.Map = function(options, self) {
operator: '&'
});
self.options.places({
keys: [
'id', 'name', 'geoname', 'countryCode',
'lat', 'lng', 'south', 'west', 'north', 'east',
'editable'
],
keys: self.placeKeys,
query: {
conditions: Ox.merge([
{key: 'lat', value: [south, north], operator: '-'}
@ -1001,13 +1002,15 @@ Ox.Map = function(options, self) {
if (place) {
select();
} else {
Ox.print()
// async && place doesn't exist yet
self.options.places({
query: {
keys: self.placeKeys,
conditions: [
{key: 'id', value: id, operator: '='}
],
operator: ''
operator: '&'
}
}, function(results) {
place = new Ox.MapPlace(Ox.extend({