Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template:
- var map = new OpenLayers.Map('map', {'projection': new OpenLayers.Projection("EPSG:900913"),
- 'maxExtent': new OpenLayers.Bounds(15,12,195,111), maxResolution: 256543})
- var ghyb = new OpenLayers.Layer.Google("Google Hybrid",
- {'type': G_HYBRID_MAP, numZoomLevels: 20});
- var mappath="C:/ms4w/apps/pgr/pgr_google.map";
- var mapurl="http://localhost/cgi-bin/mapserv.exe";
- var soilmap = new OpenLayers.Layer.WMS("Soils",
- mapurl, {map: mappath, layers: 'poias', format: 'image/png', transparent: "true"},
- {isBaseLayer: false, 'reproject': true, opacity: 0.6});
- map.addLayers([ghyb,soilmap]);
- map.setCenter(new OpenLayers.LonLat(105,65), 3);
- ==========================================================
- mapfile:
- MAP
- NAME "wms_pgr"
- IMAGETYPE PNG
- STATUS ON
- EXTENT 15 12 195 111
- SIZE 800 600
- SHAPEPATH "C:\ms4w\apps\pgr\data"
- IMAGECOLOR 255 255 255
- FONTSET "C:\ms4w\apps\pgr\fonts\fonts.txt"
- WEB
- TEMPLATE "C:\ms4w\apps\pgr\template.html"
- IMAGEPATH "C:\ms4w\apps\pgr\data\tmp"
- IMAGEURL "C:\ms4w\tmp"
- METADATA
- wms_title "pgr_google"
- wms_abstract "this is WMS of pgr"
- wms_onlineresource "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/pgr/pgr_google.map&"
- wms_srs "epsg:900913"
- wms_getfeatureinfo "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/pgr/pgr_google.map&"
- wms_featureformat "text/plain"
- wms_enable_request "*"
- END
- END
- PROJECTION
- "init=epsg:900913"
- END
- LAYER
- NAME poias
- DATA pochv_rayony_Russia_region_google
- STATUS ON
- TYPE POLYGON
- CLASSITEM "ZONA"
- TEMPLATE "dummy"
- CLASS
- NAME "Остальное"
- STYLE
- OUTLINECOLOR 255 0 0
- END
- END
- METADATA
- wms_title "poias"
- wms_abstract "poisa"
- wms_srs "EPSG:900913"
- wms_include_items "all"
- END
- PROJECTION
- "init=epsg:900913"
- END
- END
- END
Advertisement
Add Comment
Please, Sign In to add comment