formatted area output in place panel
This commit is contained in:
parent
64f493676b
commit
61404dd776
2 changed files with 15 additions and 9 deletions
|
@ -444,7 +444,7 @@ Ox.ListMap = function(options, self) {
|
||||||
self.$map.value(self.selectedPlace, 'type', data.selected[0]);
|
self.$map.value(self.selectedPlace, 'type', data.selected[0]);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
], ['South', 'West', 'North', 'East', 'Latitude', 'Longitude'].map(function(v) {
|
], ['Latitude', 'Longitude', 'South', 'West', 'North', 'East'].map(function(v) {
|
||||||
var id = (
|
var id = (
|
||||||
v == 'Latitude' ? 'lat' : v == 'Longitude' ? 'lng' : v
|
v == 'Latitude' ? 'lat' : v == 'Longitude' ? 'lng' : v
|
||||||
).toLowerCase(),
|
).toLowerCase(),
|
||||||
|
@ -462,14 +462,8 @@ Ox.ListMap = function(options, self) {
|
||||||
});
|
});
|
||||||
}), [
|
}), [
|
||||||
self.$areaInput = Ox.Input({
|
self.$areaInput = Ox.Input({
|
||||||
disabled: true,
|
|
||||||
id: 'area',
|
id: 'area',
|
||||||
label: 'Area',
|
}).hide()
|
||||||
labelWidth: 80,
|
|
||||||
textAlign: 'right',
|
|
||||||
type: 'float',
|
|
||||||
width: 240
|
|
||||||
})
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
self.$placeForm = Ox.Form({
|
self.$placeForm = Ox.Form({
|
||||||
|
@ -479,6 +473,17 @@ Ox.ListMap = function(options, self) {
|
||||||
.css({margin: '8px'})
|
.css({margin: '8px'})
|
||||||
.hide();
|
.hide();
|
||||||
|
|
||||||
|
self.$areaKmInput = Ox.Input({
|
||||||
|
disabled: true,
|
||||||
|
id: 'areaKm',
|
||||||
|
label: 'Area',
|
||||||
|
labelWidth: 80,
|
||||||
|
textAlign: 'right',
|
||||||
|
width: 240
|
||||||
|
})
|
||||||
|
.css({margin: '4px 0 4px 0'})
|
||||||
|
.appendTo(self.$placeForm);
|
||||||
|
|
||||||
self.$placeStatusbar = Ox.Bar({
|
self.$placeStatusbar = Ox.Bar({
|
||||||
size: 24
|
size: 24
|
||||||
});
|
});
|
||||||
|
@ -699,6 +704,7 @@ Ox.ListMap = function(options, self) {
|
||||||
self.$placeTitleName.options({title: place.geoname || ''});
|
self.$placeTitleName.options({title: place.geoname || ''});
|
||||||
self.$placeTitle.show();
|
self.$placeTitle.show();
|
||||||
self.$placeForm.values(place).show();
|
self.$placeForm.values(place).show();
|
||||||
|
self.$areaKmInput.options({value: Ox.formatArea(place.area)});
|
||||||
self.$placeButton.options({title: isResult ? 'Add Place' : 'Remove Place'});
|
self.$placeButton.options({title: isResult ? 'Add Place' : 'Remove Place'});
|
||||||
self.$revertButton.options({disabled: true}).show();
|
self.$revertButton.options({disabled: true}).show();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -21,7 +21,7 @@ Ox.MapMarker = function(options) {
|
||||||
|
|
||||||
var that = this,
|
var that = this,
|
||||||
typeColor = {
|
typeColor = {
|
||||||
country: [0, 255, 255],
|
country: [0, 128, 255],
|
||||||
region: [255, 0, 255],
|
region: [255, 0, 255],
|
||||||
city: [255, 0, 0],
|
city: [255, 0, 0],
|
||||||
borough: [255, 128, 0],
|
borough: [255, 128, 0],
|
||||||
|
|
Loading…
Reference in a new issue