Re: Problem beim einbinden eines WMS-Dienstes in OpenLayers
Geschrieben von mblaettermann (Gast) am 14. Dezember 2012 07:04:12: [flux]
Als Antwort auf:
Problem beim einbinden eines WMS-Dienstes in OpenLayers
geschrieben von
krisch78
(Gast)
am
13. Dezember 2012 08:25:
Hallo,
ich empfehle ausdrücklich die Projection Global Mercator in WebMaps zu verwenden. Ist einfach Standard. Google macht das so und auch OSM.
Um beliebige WMS Quellen zu Global Mercator zu wandeln, empfehle ich die Python Software MapProxy: http://mapproxy.org/
Hier eine beispielhafte Config:
services: demo: tms: origin:␣'nw' layers: -␣name:␣luftbild title:␣Luftbild sources:␣[cache_luftbild] caches: cache_luftbild: grids:␣[grid_mercator] sources:␣[source_luftbild] sources: source_luftbild: type:␣wms wms_opts: version:␣1.1.1 supported_srs:␣['EPSG:31467'] coverage: bbox:␣[7.5311279297,␣52.2816018681,␣10.7940673828,␣54.0368124052␣] bbox_srs:␣'EPSG:4326' http: ssl_no_cert_checks:␣true req: url:␣http://gis2.goettingen.de/ArcGIS/services/Tageblatt/MapServer/WMSServer? layers:␣1 transparent:␣true
grids: grid_mercator: tile_size:␣[256,256] srs:␣EPSG:900913 align_resolutions_with:␣GLOBAL_MERCATOR grid_31467: tile_size:␣[256,256] srs:␣EPSG:31467
globals: ##␣coordinate␣transformation␣options srs: proj_data_dir:␣/usr/share/proj
##␣cache␣options cache: #␣where␣to␣store␣the␣cached␣images base_dir:␣'./cache_data' #␣where␣to␣store␣lockfiles lock_dir:␣'./cache_data/locks' #␣request␣x*y␣tiles␣in␣one␣step meta_size:␣[2,2] #␣add␣a␣buffer␣on␣all␣sides␣(in␣pixel)␣when␣requesting␣new␣images meta_buffer:␣80
#␣image/transformation␣options image: #␣resampling_method:␣nearest resampling_method:␣bilinear #␣resampling_method:␣bicubic jpeg_quality:␣90 max_shrink_factor:␣4.0
Hier noch weitere Infos: http://mapproxy.org/docs/latest/configu … openlayers
Das Tool kann man dan mit Apache's Model mod_proxy auf einen Pfad der Website mappen, damit es von "außen" auf Port 80 erreichbar ist.
Besten Gruß
M