1 var toolserver = 'http://toolserver.org/~kolossos/openlayers/kml-on-ol.php';
\r
2 var startTag = '<iframe class="osmFrame" style="width: 100%; height: 350px; clear: both;" src="'+ toolserver + '?lang=de&uselang=de&params=';
\r
3 var endTag = '"></iframe>';
\r
5 jQuery(document).ready(function($) {
\r
7 $('.wall-item-content-wrapper').each(function(index) {
\r
8 var link = $(this).find('.wall-item-location .OSMMapLink');
\r
9 link.toggle(addIframe, removeIframe);
\r
13 function addIframe(ev) {
\r
14 var coordinate = $(ev.target).attr('title');
\r
16 var newTag = startTag + convertCoordinateString(coordinate) + endTag;
\r
17 $(ev.target).parents('.wall-item-content-wrapper').append(newTag);
\r
20 function removeIframe(ev) {
\r
21 $(ev.target).parents('.wall-item-content-wrapper').find('iframe').remove();
\r
25 function convertCoordinateString(coordinate) {
\r
26 var locstring = coordinate.split(' ');
\r
30 if (locstring[0] < 0) {
\r
35 if (locstring[1] < 0) {
\r
40 return Math.abs(locstring[0]) + northSouth + Math.abs(locstring[1]) + westEast;
\r