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]);
|
||||
}
|
||||
})
|
||||
], ['South', 'West', 'North', 'East', 'Latitude', 'Longitude'].map(function(v) {
|
||||
], ['Latitude', 'Longitude', 'South', 'West', 'North', 'East'].map(function(v) {
|
||||
var id = (
|
||||
v == 'Latitude' ? 'lat' : v == 'Longitude' ? 'lng' : v
|
||||
).toLowerCase(),
|
||||
|
@ -462,14 +462,8 @@ Ox.ListMap = function(options, self) {
|
|||
});
|
||||
}), [
|
||||
self.$areaInput = Ox.Input({
|
||||
disabled: true,
|
||||
id: 'area',
|
||||
label: 'Area',
|
||||
labelWidth: 80,
|
||||
textAlign: 'right',
|
||||
type: 'float',
|
||||
width: 240
|
||||
})
|
||||
}).hide()
|
||||
]);
|
||||
|
||||
self.$placeForm = Ox.Form({
|
||||
|
@ -479,6 +473,17 @@ Ox.ListMap = function(options, self) {
|
|||
.css({margin: '8px'})
|
||||
.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({
|
||||
size: 24
|
||||
});
|
||||
|
@ -699,6 +704,7 @@ Ox.ListMap = function(options, self) {
|
|||
self.$placeTitleName.options({title: place.geoname || ''});
|
||||
self.$placeTitle.show();
|
||||
self.$placeForm.values(place).show();
|
||||
self.$areaKmInput.options({value: Ox.formatArea(place.area)});
|
||||
self.$placeButton.options({title: isResult ? 'Add Place' : 'Remove Place'});
|
||||
self.$revertButton.options({disabled: true}).show();
|
||||
} else {
|
||||
|
|
|
@ -21,7 +21,7 @@ Ox.MapMarker = function(options) {
|
|||
|
||||
var that = this,
|
||||
typeColor = {
|
||||
country: [0, 255, 255],
|
||||
country: [0, 128, 255],
|
||||
region: [255, 0, 255],
|
||||
city: [255, 0, 0],
|
||||
borough: [255, 128, 0],
|
||||
|
|
Loading…
Reference in a new issue