This commit is contained in:
j 2011-05-29 23:00:26 +00:00
parent 5059172d47
commit ef6bb1753a
2 changed files with 20 additions and 20 deletions

View file

@ -61,21 +61,6 @@ Ox.ListMap = function(options, self) {
marginLeft: '-3px', marginLeft: '-3px',
marginTop: 0 marginTop: 0
}); });
/*
.css({
width: '21px',
height: '14px'
})
.load(function() {
var $this = $(this);
Ox.print($this.width() / $this.height())
$this.css({
width: Math.round(14 * $this.width() / $this.height()) + 'px',
height: '14px',
padding: '1px 0 0 1px'
});
});
*/
}, },
id: 'countryCode', id: 'countryCode',
resizable: false, // fixme: implement resizable: false, // fixme: implement

View file

@ -761,6 +761,22 @@ Ox.Map = function(options, self) {
} }
}); });
} else { } else {
Ox.print('QUERY', {
conditions: Ox.merge([
{key: 'lat', value: [south, north], operator: '-'}
], !crossesDateline ? [
{key: 'lng', value: [west, east], operator: '-'}
] : [
{
conditions: [
{key: 'lng', value: west, operator: '<'},
{key: 'lng', value: east, operator: '>'}
],
operator: '|'
}
]),
operator: '&'
});
self.options.places({ self.options.places({
keys: [ keys: [
'id', 'name', 'geoname', 'countryCode', 'id', 'name', 'geoname', 'countryCode',
@ -786,6 +802,7 @@ Ox.Map = function(options, self) {
range: [0, self.options.maxMarkers], range: [0, self.options.maxMarkers],
sort: [{key: 'area', operator: '+'}] sort: [{key: 'area', operator: '+'}]
}, function(result) { }, function(result) {
Ox.print('RESULT', result)
var ids = []; var ids = [];
result.data.items.forEach(function(item, i) { result.data.items.forEach(function(item, i) {
var place = getPlaceById(item.id); var place = getPlaceById(item.id);
@ -957,11 +974,9 @@ Ox.Map = function(options, self) {
// async && place doesn't exist yet // async && place doesn't exist yet
self.options.places({ self.options.places({
query: { query: {
conditions: [ key: 'id',
{key: 'id', value: id, operator: '^$'} value: id,
], operator: '^$'
operator: ''
} }
}, function(results) { }, function(results) {
place = new Ox.MapPlace(Ox.extend({ place = new Ox.MapPlace(Ox.extend({