Подскажите пожалуйста решение: необходимо отобразить ряд шейп-файлов на подложке из ОпенСтритМап.
На Гис-лабе много статей, посвященных и Mapserver и OpenLayers (большое спасибо авторам), но прочитав их и поэксперимент над .map и .html - к решению я так и не приблизился. Вот что у меня получилось:
.map file:
Код: Выделить всё
MAP
  NAME        "mapserver_tutorial_wms_server"
  IMAGETYPE   PNG
  EXTENT      139.72520 35.67139 139.78845 35.70731       
  SIZE        550 450
  IMAGECOLOR  255 255 255
  SHAPEPATH   "../data"
  FONTSET     ../fonts/fonts.txt
  UNITS dd
  WEB	
    TEMPLATE  'example_template.html'
    IMAGEPATH "C:\OSGeo4W/tmp/ms_tmp/"
    IMAGEURL "/ms_tmp/"
    MINSCALEDENOM  1000
    MAXSCALEDENOM  70000
    METADATA
      "wms_title"          "MapServer Tutorial WMS Server"
      "wms_onlineresource" "http://127.0.0.1/cgi-bin/mapserv.exe?MAP=C:\OSGeo4W/apps/mapserver-tutorial/example12.map"
      "wms_srs"            "EPSG:4301 EPSG:4269 EPSG:4326"
      "wms_abstract"       "This demonstration server shows how to setup a MapServer .map file to serve data through the WMS standard."
    END    
  END
  
  PROJECTION
    "init=epsg:4326"
  END  
  LAYER 
    NAME "places"
    METADATA
    "wms_title"    "Place name"
    END     
    DATA chimei_epsg_4326 
    STATUS ON
    TYPE POINT
    LABELITEM "NAMAE"
    CLASS
      NAME "Places"
      STYLE
        COLOR 10 100 100
      END
      LABEL
        TYPE TRUETYPE
        FONT pgothic
        COLOR 220 20 20
        SIZE 7
        POSITION CL
        PARTIALS FALSE
        BUFFER 5
        ENCODING "SHIFT_JIS"                              
      END
    END
    PROJECTION
      "init=epsg:4326"
    END    
  END 
END 
Код: Выделить всё
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
    <link rel="stylesheet" href="style.css" type="text/css" />
    <style type="text/css">
        #map {
         width: 800px;
            height: 500px;
            border: 1px solid black;
        }
    </style>
    <script src="OpenLayers.js"></script>
    <script type="text/javascript">
        var lon = 139.72520;
        var lat = 35.67139;
        var zoom = 11;
        var map, layer, localWMS ;
        function init(){
            map = new OpenLayers.Map( 'map');
            layer = new OpenLayers.Layer.OSM( "Simple OSM Map");
            
            localWMS = new OpenLayers.Layer.WMS( "Local WMS layers",
			          "http://127.0.0.1/cgi-bin/mapserv.exe?MAP=C:/OSGeo4W/apps/mapserver-tutorial/example12/example_4326.map",
			          {layers: 'mapserver_tutorial_wms_server', transparent: true}, {isBaseLayer: false});
            
            map.addLayer(layer);
            map.setCenter(
                new OpenLayers.LonLat(lon, lat).transform(
                    new OpenLayers.Projection("EPSG:4326"),
                    map.getProjectionObject()
                ), zoom
            );    
        }
    </script>
  </head>
  <body onload="init()">
    <h1 id="title">OpenLayers Example</h1>
    <div id="tags">
    </div>
    <p id="shortdesc">
        Shows the basic use of OpenLayers with our local WMS layers and a GeoGrid WMS layer.
    </p>
    <div id="map" class="smallmap"></div>
    <div id="docs">
        OpenLayers is a JavaScript file (OpenLayers.js) that can be easily included in any HTML file.<br>Click on the source
        below to see the few lines required to add these 2 WMS servers into the map.<br>
          <br>
          <hr noshade width="40%" size="1" align="left">
          <a href="/mapserver-tutorial/example14/openlayers_source.html">- (source) -</a>  
          <a href="/mapserver-tutorial/index.html">- (back) -</a>
    </div>
  </body>
</html>Шейп перепроицировал epsg : 4326, экстент и охват вроде настроены верно.
Видимо не верно составлен .map файл или я не верно к нему обращаюсь в .html
Подскажите пожалуйста, третий день бьюсь.