Das Wiki für den Bayerischen Wald

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen gezeigt.

Link zu dieser Vergleichsansicht

wms_ueber_google_maps_api [2018/04/22 06:28] (aktuell)
Zeile 1: Zeile 1:
 +====== WMS über die Google-Maps-API ======
  
 +
 +<​html>​
 +    <script src="​http://​maps.google.com/​maps?​file=api&​amp;​v=2&​amp;​key=ABQIAAAAUSBKoyDMLxSQ7fpmwZLkshS-XyCpDTUa25t9K7tgPZeAxcow8xTd3viNFptg11bDwccdAzIJQ98azw"​
 +            type="​text/​javascript"></​script>​
 +    <script src="​http://​www.waidlerwiki.de/​wms-tk50.js"​ type="​text/​javascript"></​script>​
 +
 +    <div id="​map"​ style="​width:​ 700px; height: 600px"></​div>​
 +
 +    <script type="​text/​javascript">​
 +    ​
 +    var map = new GMap(document.getElementById("​map"​));​
 +
 +    var tileTK50= new GTileLayer(new GCopyrightCollection(""​),​13,​16);​
 +    tileTK50.baseurl='​http://​deutschlandviewer.bayern.de/​ogc/​getogc.cgi?';​
 +    tileTK50.getTileUrl=CustomGetTileUrlEPSG4326;​
 +    tileTK50.layers = "​TK50";​
 +    tileTK50.mymap = map;
 +//    tileTK50.getOpacity = function() {return 1.0;}
 +    tileTK50.resample= "​OFF";​
 +    var layerTK50=[G_NORMAL_MAP.getTileLayers()[0],​tileTK50]; ​
 +
 +    var tileTK50a= new GTileLayer(new GCopyrightCollection(""​),​13,​16);​
 +    tileTK50a.baseurl='​http://​deutschlandviewer.bayern.de/​ogc/​getogc.cgi?';​
 +    tileTK50a.center=new GLatLng(48.809,​ 13.5478);
 +    tileTK50a.getTileUrl=CustomGetTileUrlEPSG4326;​
 +    tileTK50a.layers = "​TK50";​
 +    tileTK50a.mymap = map;
 +//    tileTK50a.getOpacity = function() {return 1.0;}
 +    tileTK50a.resample= "​ON";​
 +    var layerTK50a=[G_NORMAL_MAP.getTileLayers()[0],​tileTK50a]; ​
 +
 +
 +    var tileUK500= new GTileLayer(new GCopyrightCollection(""​),​10,​12);​
 +    tileUK500.baseurl='​http://​deutschlandviewer.bayern.de/​ogc/​getogc.cgi?';​
 +    tileUK500.center=new GLatLng(48.809,​ 13.5478);
 +    tileUK500.getTileUrl=CustomGetTileUrlEPSG4326;​
 +    tileUK500.layers = "​UK500";​
 +    tileUK500.getOpacity = function() {return 1.0;}
 +    tileUK500.mymap = map;
 +    var layerUK500=[G_SATELLITE_MAP.getTileLayers()[0],​tileUK500]; ​
 +
 +
 +    var custommap1 = new GMapType([tileTK50,​tileUK500],​ G_NORMAL_MAP.getProjection(),​ "​TK50",​ G_NORMAL_MAP); ​  
 +    map.addMapType(custommap1);​
 +
 +    var custommap2 = new GMapType(layerTK50a,​ G_NORMAL_MAP.getProjection(),​ "​TK50a",​ G_NORMAL_MAP); ​  
 +    map.addMapType(custommap2);​
 +
 +    var custommap3 = new GMapType([tileUK500],​ G_NORMAL_MAP.getProjection(),​ "​UK500",​ G_NORMAL_MAP); ​  
 +    map.addMapType(custommap3);​
 +
 +    var layerPHYS =G_PHYSICAL_MAP.getTileLayers()[0];​
 +    layerPHYS.getOpacity = function() {return 0.6;}
 +    tileTK50.getOpacity = function() {return 1.0;}
 +
 +    var custommap4 = new GMapType([tileTK50,​layerPHYS],​ G_NORMAL_MAP.getProjection(),​ "​TR",​ G_NORMAL_MAP); ​  
 +    map.addMapType(custommap4);​
 +
 +    map.addMapType(G_PHYSICAL_MAP);​
 +
 +    map.setCenter(new GLatLng(48.809,​ 13.5478), 14);
 +    map.addControl(new GLargeMapControl());​
 +    map.addControl(new GMapTypeControl());​
 +    </​script>​
 +</​html>​
 +
 +-> [[http://​www.waidlerwiki.de/​wms-tk50.js|WMS-TK50.js]] (URL für Einbindung) \\
 +-> [[wms-tk50]] (bearbeitbarer Sourcecode als Wiki-Seite) ​
 +
 +
 +
 +===== siehe auch =====
 +
 +  * [[WMS]]

wms_ueber_google_maps_api.txt · Zuletzt geändert: 2018/04/22 06:28 (Externe Bearbeitung)

test