unknown symbol displays a question mark
parent
309cd26601
commit
3b3d1df1b9
|
@ -714,7 +714,7 @@ input[type=checkbox]
|
|||
background: url('images/symbols/geocache-open.png') no-repeat right 8px center rgba(240, 240, 240, 0.90);
|
||||
}
|
||||
|
||||
.contact-alien, .contact-bigears, .contact-female3, .contact-cat, .contact-dog{
|
||||
.contact-alien, .contact-bigears, .contact-female3, .contact-cat, .contact-dog, .unknown{
|
||||
background-size: 24px 24px !important;
|
||||
background-repeat: no-repeat !important;
|
||||
width: 24px !important;
|
||||
|
@ -723,6 +723,12 @@ input[type=checkbox]
|
|||
.contact-alien{
|
||||
background-image: url('images/symbols/contact-alien.png') !important;
|
||||
}
|
||||
.unknown{
|
||||
background-image: url('images/symbols/unknown.png') !important;
|
||||
}
|
||||
.unknown-select{
|
||||
background: url('images/symbols/unknown.png') no-repeat right 8px center rgba(240, 240, 240, 0.90);
|
||||
}
|
||||
.contact-alien-select{
|
||||
background: url('images/symbols/contact-alien.png') no-repeat right 8px center rgba(240, 240, 240, 0.90);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ var gpxedit = {
|
|||
};
|
||||
|
||||
var symbolSelectClasses = {
|
||||
'unknown': 'unknown-select',
|
||||
'marker': 'marker-select',
|
||||
'Dot, White': 'dot-select',
|
||||
'Pin, Blue': 'pin-blue-select',
|
||||
|
@ -434,7 +435,15 @@ function load_map() {
|
|||
buttonParent.find('textarea.layerDesc').val(gpxedit.layersData[id].description);
|
||||
buttonParent.find('textarea.layerCmt').val(gpxedit.layersData[id].comment);
|
||||
if (gpxedit.layersData[id].layer.type === 'marker'){
|
||||
if (symbolIcons.hasOwnProperty(gpxedit.layersData[id].symbol)){
|
||||
buttonParent.find('select[role=symbol]').val(gpxedit.layersData[id].symbol);
|
||||
}
|
||||
else if(gpxedit.layersData[id].symbol === ''){
|
||||
buttonParent.find('select[role=symbol]').val('');
|
||||
}
|
||||
else{
|
||||
buttonParent.find('select[role=symbol]').val('unknown');
|
||||
}
|
||||
buttonParent.find('select[role=symbol]').change();
|
||||
}
|
||||
});
|
||||
|
@ -467,6 +476,7 @@ function onCreated(type, layer){
|
|||
if (type === 'marker') {
|
||||
popupTxt = popupTxt + '<tr><td>'+t('gpxedit', 'Symbol')+'</td><td><select role="symbol">';
|
||||
popupTxt = popupTxt + '<option value="">'+t('gpxedit', 'No symbol')+'</option>';
|
||||
popupTxt = popupTxt + '<option value="unknown">'+t('gpxedit', 'Unknown symbol')+'</option>';
|
||||
for (var cl in symbolIcons){
|
||||
if (cl !== 'marker'){
|
||||
popupTxt = popupTxt + '<option value="'+cl+'">'+cl+'</option>';
|
||||
|
@ -658,6 +668,12 @@ function drawMarker(latlng, name, desc, cmt, sym, time){
|
|||
if (symboo && sym !== '' && symbolIcons.hasOwnProperty(sym)){
|
||||
m.setIcon(symbolIcons[sym]);
|
||||
}
|
||||
else if(symboo && sym !== ''){
|
||||
m.setIcon(L.divIcon({
|
||||
className: 'unknown',
|
||||
iconAnchor: [12, 12]
|
||||
}));
|
||||
}
|
||||
else{
|
||||
m.setIcon(symbolIcons[wst]);
|
||||
}
|
||||
|
@ -1137,10 +1153,15 @@ $(document).ready(function(){
|
|||
gpxedit.layersData[id].name = name;
|
||||
gpxedit.layersData[id].description = description;
|
||||
gpxedit.layersData[id].comment = comment;
|
||||
if (symbol !== 'unknown'){
|
||||
gpxedit.layersData[id].symbol = symbol;
|
||||
}
|
||||
gpxedit.layersData[id].layer.unbindTooltip();
|
||||
if (type === 'marker'){
|
||||
if (symboo && symbol !== '' && symbolIcons.hasOwnProperty(symbol)){
|
||||
if (symbol === 'unknown'){
|
||||
// pass
|
||||
}
|
||||
else if (symboo && symbol !== '' && symbolIcons.hasOwnProperty(symbol)){
|
||||
gpxedit.layersData[id].layer.setIcon(symbolIcons[symbol])
|
||||
}
|
||||
else{
|
||||
|
|
Loading…
Reference in New Issue