/* TrackViewer API*** Copyright 2012, Helmut Karger* http://www.gpswandern.de**/ function TrackViewer () {var self = this;this.version = '2/0/1';this.url = '';this.mapDiv = '';this.mapType = 'hybrid';this.lineColor = ['#FF0000', '#0000FF', '#FF6000', '#FF1493', '#008000', '#8B008B', '#7FFF00', '#B22222', '#00FFFF', '#FFD700', '#8A2BE2'];this.overwriteGpxColor = false;this.lineArrows = true;this.scrollWheelZoom = true;this.eleLargeTabDiv = '';this.eleSmallTabDiv = '';this.eleProfDiv = '';this.eleProfWidth = 550;this.eleProfHeight = 170;this.eleProfRouteStyle = 'auto';this.eleProfXsections = 10;this.eleProfYsections = 5;this.eleProfMarginLeft = 50;this.eleProfMarginBottom = 20;this.eleProfMarginRight = 20;this.eleProfMarginTop = 20;this.eleProfAxisWidth = 2;this.eleProfAxisColor = '#000000';this.eleProfMarkerLength = 7;this.eleProfGridColor = "#eeeeee";this.eleDataUpDownThreshold = 5;this.cacheOff = false;this.local = new Object(); this.request = function() { $(document).ready(function() {if(window.userExit1) userExit1(self);self.backLink = aac(self);self.home = location.href;var aap = abn(self);delete aap.host;delete aap.data;delete aap.local;var aba = "http://tvapi.gpswandern.de/v/"+self.version+"/geturl.php?callback=?"+"&q="+encodeURIComponent(JSON.stringify(aap));$.getJSON(aba, function(abc) {self.host = abc.host;self.data = abc.data;if(window.userExit2) userExit2(self);if(self.host.status == '') {if(window.userExit3) userExit3(self);if(self.local.map) {self.aag();} else {self.initMap();}self.abb();self.abd();self.aah();self.aad();if(window.userExit4) userExit4(self);} else {fehlerAusgabe(self);}});});} this.initMap = function() {if((!this.mapDiv) || ($("#"+this.mapDiv).length == 0)) return;var aak = new google.maps.ImageMapType({getTileUrl: function(abj, abq) {return "http://tile.openstreetmap.org/" + abq + "/" + abj.x + "/" + abj.y + ".png";},tileSize: new google.maps.Size(256, 256),isPng: true,maxZoom: 18,name: "OSM",alt: "Open-Street-Map Karte anzeigen"});var aar = new google.maps.ImageMapType({getTileUrl: function(abj, abq) {return "http://c.tile.opencyclemap.org/cycle/" + abq + "/" + abj.x + "/" + abj.y + ".png";},tileSize: new google.maps.Size(256, 256),isPng: true,maxZoom: 18,name: "OSM Cycle",alt: "OSM mit Radwegen anzeigen"});var aat = {zoom: 11,center: new google.maps.LatLng(48.1372283, 11.5755014),scaleControl: true,scrollwheel: this.scrollWheelZoom,mapTypeControlOptions: {mapTypeIds: [google.maps.MapTypeId.ROADMAP,google.maps.MapTypeId.SATELLITE,google.maps.MapTypeId.HYBRID,google.maps.MapTypeId.TERRAIN,'osm','osmc'],style: google.maps.MapTypeControlStyle.DEFAULT}};this.local.map = new google.maps.Map(document.getElementById(this.mapDiv),aat);this.local.map.mapTypes.set('osm', aak);this.local.map.mapTypes.set('osmc', aar); if (this.local.map.getMapTypeId() != this.mapType) {self.local.map.setMapTypeId(self.mapType);}if (this.host) {this.local.map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(this.host.gpx.bounds.minlat,this.host.gpx.bounds.minlon),new google.maps.LatLng(this.host.gpx.bounds.maxlat,this.host.gpx.bounds.maxlon)));} else {this.local.map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(45.81, 6.04),new google.maps.LatLng(55.06, 17.14)));}var aaw = document.createElement("div");aaw.id = "osm-copyright";aaw.style.fontSize = "10px";aaw.style.lineHeight = "19px";aaw.style.fontFamily = "Arial, sans-serif";aaw.style.margin = "0 2px 0 2px";aaw.style.whiteSpace = "nowrap";this.local.map.controls[google.maps.ControlPosition.BOTTOM_RIGHT].push(aaw);google.maps.event.addListener(this.local.map, 'maptypeid_changed', function() {aai(self);}); google.maps.event.addListenerOnce(this.local.map, 'idle', function () {setTimeout(function() {aai(self)},50);self.local.aax = new google.maps.OverlayView();self.local.aax.draw = function() {};self.local.aax.setMap(self.local.map);self.abg = function(abi) {var abr = self.local.aax.getProjection();return(abr.fromLatLngToContainerPixel(abi));}}); $("#"+this.mapDiv).css({position: "relative"});$("
';abt += "" + abm.name + "";if (abm.ele) {abt += "
Höhe: " + abm.ele+"m"};if (abm.desc) {abt += "
" + abm.desc};if (abm.cmt) {abt += "
" + abm.cmt};abt += "
Der Trackviewer wird bereitgestellt von "+"www.gpswandern.de.
"+""+""+"Diesen Hinweis entfernen.
";var abp = $('a').filter(function() {return /^http:\/\/www.gpswandern.de/i.test(this.href);});if (abp.length == 0) {setTimeout(function() {pos = getBestCopyDiv(abw);pos.parent.css({position: "relative"});$(""+abv+"
";} else {var abt = ""+abw.host.status+"
";}$("