Guest User

Untitled

a guest
Sep 23rd, 2011
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. template:
  2.  
  3. var map = new OpenLayers.Map('map', {'projection': new OpenLayers.Projection("EPSG:900913"),
  4. 'maxExtent': new OpenLayers.Bounds(15,12,195,111), maxResolution: 256543})
  5.  
  6.  
  7. var ghyb = new OpenLayers.Layer.Google("Google Hybrid",
  8. {'type': G_HYBRID_MAP, numZoomLevels: 20});
  9.  
  10. var mappath="C:/ms4w/apps/pgr/pgr_google.map";
  11. var mapurl="http://localhost/cgi-bin/mapserv.exe";
  12.  
  13. var soilmap = new OpenLayers.Layer.WMS("Soils",
  14. mapurl, {map: mappath, layers: 'poias', format: 'image/png', transparent: "true"},
  15. {isBaseLayer: false, 'reproject': true, opacity: 0.6});
  16.  
  17.  
  18. map.addLayers([ghyb,soilmap]);
  19. map.setCenter(new OpenLayers.LonLat(105,65), 3);
  20.  
  21. ==========================================================
  22.  
  23. mapfile:
  24.  
  25. MAP
  26. NAME "wms_pgr"
  27. IMAGETYPE PNG
  28. STATUS ON
  29. EXTENT 15 12 195 111
  30. SIZE 800 600
  31. SHAPEPATH "C:\ms4w\apps\pgr\data"
  32. IMAGECOLOR 255 255 255
  33. FONTSET "C:\ms4w\apps\pgr\fonts\fonts.txt"
  34.  
  35.  
  36. WEB
  37. TEMPLATE "C:\ms4w\apps\pgr\template.html"
  38. IMAGEPATH "C:\ms4w\apps\pgr\data\tmp"
  39. IMAGEURL "C:\ms4w\tmp"
  40.  
  41.  
  42. METADATA
  43. wms_title "pgr_google"
  44. wms_abstract "this is WMS of pgr"
  45. wms_onlineresource "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/pgr/pgr_google.map&"
  46. wms_srs "epsg:900913"
  47. wms_getfeatureinfo "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/pgr/pgr_google.map&"
  48. wms_featureformat "text/plain"
  49. wms_enable_request "*"
  50. END
  51. END
  52.  
  53. PROJECTION
  54. "init=epsg:900913"
  55. END
  56.  
  57. LAYER
  58. NAME poias
  59. DATA pochv_rayony_Russia_region_google
  60. STATUS ON
  61. TYPE POLYGON
  62. CLASSITEM "ZONA"
  63. TEMPLATE "dummy"
  64.  
  65. CLASS
  66. NAME "Остальное"
  67. STYLE
  68. OUTLINECOLOR 255 0 0
  69. END
  70. END
  71.  
  72.  
  73.  
  74. METADATA
  75. wms_title "poias"
  76. wms_abstract "poisa"
  77. wms_srs "EPSG:900913"
  78. wms_include_items "all"
  79. END
  80.  
  81. PROJECTION
  82. "init=epsg:900913"
  83. END
  84.  
  85.  
  86.  
  87.  
  88.  
  89. END
  90. END
Advertisement
Add Comment
Please, Sign In to add comment