1var toolserver = 'http://toolserver.org/~kolossos/openlayers/kml-on-ol.php'; 2var startTag = '<iframe class="osmFrame" style="width: 100%; height: 350px; clear: both;" src="'+ toolserver + '?lang=de&uselang=de&params='; 3var endTag = '"></iframe>'; 4 5// @TODO document.ready() does not work for ajax loaded content 6jQuery(document).ready(function($) { 7 $('.wall-item-content-wrapper').each(function(index) { 8 var link = $(this).find('.wall-item-location .OSMMapLink'); 9 link.toggle(addIframe, removeIframe); 10 }); 11}); 12 13function addIframe(ev) { 14 var coordinate = $(ev.target).attr('title'); 15 var newTag = startTag + convertCoordinateString(coordinate) + endTag; 16 $(ev.target).parents('.wall-item-content-wrapper').append(newTag); 17} 18 19function removeIframe(ev) { 20 $(ev.target).parents('.wall-item-content-wrapper').find('iframe').remove(); 21} 22 23function convertCoordinateString(coordinate) { 24 var locstring = coordinate.split(' '); 25 var northSouth; 26 var westEast; 27 28 if (locstring[0] < 0) { 29 northSouth = '_S_'; 30 }else{ 31 northSouth = '_N_'; 32 } 33 if (locstring[1] < 0) { 34 westEast = '_W'; 35 }else{ 36 westEast = '_E'; 37 } 38 return Math.abs(locstring[0]) + northSouth + Math.abs(locstring[1]) + westEast; 39}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.