merging changes
This commit is contained in:
parent
4f81b9eaee
commit
7968a11116
5 changed files with 23 additions and 5 deletions
|
@ -17,7 +17,7 @@ Ox.load('UI', {
|
||||||
geoname: place.name,
|
geoname: place.name,
|
||||||
id: place.code,
|
id: place.code,
|
||||||
name: place.name,
|
name: place.name,
|
||||||
type: 'Country',
|
type: 'country',
|
||||||
lat: place.lat,
|
lat: place.lat,
|
||||||
lng: place.lng,
|
lng: place.lng,
|
||||||
south: place.south,
|
south: place.south,
|
||||||
|
@ -26,6 +26,7 @@ Ox.load('UI', {
|
||||||
east: place.east
|
east: place.east
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
|
showTypes: true,
|
||||||
width: window.innerWidth
|
width: window.innerWidth
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
|
|
@ -176,6 +176,7 @@ Ox.load('Geo', function() {
|
||||||
places.splice(i, 1);
|
places.splice(i, 1);
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
|
//showTypes: true,
|
||||||
width: window.innerWidth
|
width: window.innerWidth
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
|
|
@ -209,7 +209,7 @@ Ox.ListMap = function(options, self) {
|
||||||
operator: '-',
|
operator: '-',
|
||||||
title: 'Matches',
|
title: 'Matches',
|
||||||
visible: false,
|
visible: false,
|
||||||
width: 96,
|
width: 64,
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -287,6 +287,7 @@ Ox.ListMap = function(options, self) {
|
||||||
height: self.options.height,
|
height: self.options.height,
|
||||||
places: self.options.places,
|
places: self.options.places,
|
||||||
//statusbar: true,
|
//statusbar: true,
|
||||||
|
showTypes: self.options.showTypes,
|
||||||
toolbar: true,
|
toolbar: true,
|
||||||
width: self.options.width - 514,//self.mapResize[1],
|
width: self.options.width - 514,//self.mapResize[1],
|
||||||
zoombar: true
|
zoombar: true
|
||||||
|
|
|
@ -33,6 +33,7 @@ Ox.Map <function> Basic map object
|
||||||
selected <s|""> Id of the selected place
|
selected <s|""> Id of the selected place
|
||||||
showControls <b|false> If true, show controls
|
showControls <b|false> If true, show controls
|
||||||
showLabels <b|false> If true, show labels on the map
|
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
|
statusbar <b|false> If true, the map has a statusbar
|
||||||
toolbar <b|false> If true, the map has a toolbar
|
toolbar <b|false> If true, the map has a toolbar
|
||||||
self <o|{}> Shared private variable
|
self <o|{}> Shared private variable
|
||||||
|
@ -99,6 +100,7 @@ Ox.Map = function(options, self) {
|
||||||
selected: null,
|
selected: null,
|
||||||
showControls: false,
|
showControls: false,
|
||||||
showLabels: false,
|
showLabels: false,
|
||||||
|
showTypes: false,
|
||||||
statusbar: false,
|
statusbar: false,
|
||||||
toolbar: false,
|
toolbar: false,
|
||||||
zoombar: false
|
zoombar: false
|
||||||
|
@ -1009,8 +1011,7 @@ Ox.Map = function(options, self) {
|
||||||
query: {
|
query: {
|
||||||
conditions: [
|
conditions: [
|
||||||
{key: 'id', value: id, operator: '='}
|
{key: 'id', value: id, operator: '='}
|
||||||
],
|
]
|
||||||
operator: '&'
|
|
||||||
}
|
}
|
||||||
}, function(results) {
|
}, function(results) {
|
||||||
place = new Ox.MapPlace(Ox.extend({
|
place = new Ox.MapPlace(Ox.extend({
|
||||||
|
|
|
@ -19,7 +19,21 @@ Ox.MapMarker = function(options) {
|
||||||
size: 16
|
size: 16
|
||||||
}, options);
|
}, 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) {
|
Ox.forEach(options, function(val, key) {
|
||||||
that[key] = val;
|
that[key] = val;
|
||||||
|
|
Loading…
Reference in a new issue