merging changes

This commit is contained in:
rolux 2011-05-30 20:57:22 +02:00
parent 4f81b9eaee
commit 7968a11116
5 changed files with 23 additions and 5 deletions

View file

@ -17,7 +17,7 @@ Ox.load('UI', {
geoname: place.name,
id: place.code,
name: place.name,
type: 'Country',
type: 'country',
lat: place.lat,
lng: place.lng,
south: place.south,
@ -26,6 +26,7 @@ Ox.load('UI', {
east: place.east
};
}),
showTypes: true,
width: window.innerWidth
})
.bindEvent({

View file

@ -176,6 +176,7 @@ Ox.load('Geo', function() {
places.splice(i, 1);
callback();
},
//showTypes: true,
width: window.innerWidth
})
.bindEvent({

View file

@ -209,7 +209,7 @@ Ox.ListMap = function(options, self) {
operator: '-',
title: 'Matches',
visible: false,
width: 96,
width: 64,
}
];
@ -287,6 +287,7 @@ Ox.ListMap = function(options, self) {
height: self.options.height,
places: self.options.places,
//statusbar: true,
showTypes: self.options.showTypes,
toolbar: true,
width: self.options.width - 514,//self.mapResize[1],
zoombar: true

View file

@ -33,6 +33,7 @@ Ox.Map <function> Basic map object
selected <s|""> Id of the selected place
showControls <b|false> If true, show controls
showLabels <b|false> If true, show labels on the map
showTypes <b|false> If true, color markers according to place type
statusbar <b|false> If true, the map has a statusbar
toolbar <b|false> If true, the map has a toolbar
self <o|{}> Shared private variable
@ -99,6 +100,7 @@ Ox.Map = function(options, self) {
selected: null,
showControls: false,
showLabels: false,
showTypes: false,
statusbar: false,
toolbar: false,
zoombar: false
@ -1009,8 +1011,7 @@ Ox.Map = function(options, self) {
query: {
conditions: [
{key: 'id', value: id, operator: '='}
],
operator: '&'
]
}
}, function(results) {
place = new Ox.MapPlace(Ox.extend({

View file

@ -19,7 +19,21 @@ Ox.MapMarker = function(options) {
size: 16
}, options);
var that = this;
var that = this,
typeColor = {
country: [0, 0, 255],
region: [128, 0, 255],
city: [255, 0, 0],
borough: [255, 128, 0],
street: [255, 255, 0],
premise: [128, 255, 0],
feature: [0, 255, 0],
other: [128, 128, 128]
};
Ox.print('TYPE:', options.place.type)
if (typeColor[options.place.type]) {
options.color = typeColor[options.place.type];
}
Ox.forEach(options, function(val, key) {
that[key] = val;