[OpenLayers-Users] WMS Example Problem
erwin nindl
nine-ol-users at wirdorange.org
Tue Jul 3 10:54:47 PDT 2012
hi,
i want to create a wms layer in combination with a osm layer.
my first trials do not work:
http://phoenix.nindl.net/~nine/agis/manual.html
or a snipped here:
> function init() {
> var lon = 15.4, lat = 47, zoom = 12;
> var map;
> map = new OpenLayers.Map('map',{
> projection: "EPSG:102100"
> });
> var osm = new OpenLayers.Layer.OSM;
> var wms = new OpenLayers.Layer.WMS(
> "ogd graz",
> "http://geodaten1.graz.at/ArcGIS_Graz/services/Extern/BASISKARTE_WMS/MapServer/WMSServer",
> {layers: '3'}
> );
> map.addLayers([wms, osm]);
> //map.addLayers([wms]);
> map.setCenter(new OpenLayers.LonLat(lon, lat, zoom).transform( new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:102100")), zoom);
> //map.setCenter(new OpenLayers.LonLat(lon, lat, zoom));
> map.addControl(new OpenLayers.Control.LayerSwitcher());
> map.addControl(new OpenLayers.Control.MousePosition({id:'mouse'}) );
> }
the wms-source can be found here:
http://geodaten1.graz.at/ArcGIS_Graz/rest/services/Extern/BASISKARTE_WMS/MapServer
and a preview of the prefered tiles can be seen here:
http://www.arcgis.com/home/webmap/viewer.html?url=http%3a%2f%2fgeodaten1.graz.at%2fArcGIS_Graz%2frest%2fservices%2fExtern%2fBASISKARTE_WMS%2fMapServer&source=sd
where is my mistake?
best regards
erwin
More information about the Users
mailing list