switch to map on bookmark click
This commit is contained in:
@ -303,12 +303,18 @@
|
||||
// If it's a map
|
||||
if(typeList == 'bkmrk_maps'){
|
||||
if(bkmrk['label']==''){ label = bkmrk['latlng']+' ['+bkmrk['z']+']'; }
|
||||
btn_link = '<a class="bookmarksLink" onclick="map.setView(['+latlng+'], '+bkmrk['z']+');return false;">'+label+'</a>';
|
||||
if (!window.isSmartphone())
|
||||
btn_link = '<a class="bookmarksLink" onclick="map.setView(['+latlng+'], '+bkmrk['z']+');return false;">'+label+'</a>';
|
||||
else
|
||||
btn_link = '<a class="bookmarksLink" onclick="map.setView(['+latlng+'], '+bkmrk['z']+'); window.show(\'map\'); return false;">'+label+'</a>';
|
||||
}
|
||||
// If it's a portal
|
||||
else if(typeList == 'bkmrk_portals'){
|
||||
var guid = bkmrk['guid'];
|
||||
var btn_link = '<a class="bookmarksLink" onclick="window.zoomToAndShowPortal(\''+guid+'\', ['+latlng+']);return false;">'+label+'</a>';
|
||||
if (!window.isSmartphone())
|
||||
var btn_link = '<a class="bookmarksLink" onclick="window.zoomToAndShowPortal(\''+guid+'\', ['+latlng+']);return false;">'+label+'</a>';
|
||||
else
|
||||
var btn_link = '<a class="bookmarksLink" onclick="window.zoomToAndShowPortal(\''+guid+'\', ['+latlng+']); window.show(\'map\'); return false;">'+label+'</a>';
|
||||
}
|
||||
// Create the bookmark
|
||||
elementTemp += '<li class="bkmrk" id="'+idBkmrk+'">'+btn_remove+btn_link+'</li>';
|
||||
|
Reference in New Issue
Block a user