I'm currently setting up a Mapserver/OpenLayers application. My
mapscript works fine when i run on mapserver, but my mapserver layer
not showing up in openlayers.

this is my script

===================== "tangsel.map"============================
MAP
  NAME "TANGSEL"
  STATUS ON
  EXTENT 106.636718 -6.363274 106.779904 -6.228827
  SIZE 885 600
  SHAPEPATH "../shp"
  IMAGETYPE PNG
  IMAGECOLOR 252 253 255
  UNITS DD

  PROJECTION
    "init=epsg:4326"
  END

  LAYER
      PROJECTION
        "init=epsg:32748"
      END
      NAME "tangsel"
      DATA "tangsel"
      TYPE POLYGON
      STATUS ON
      CLASS
          NAME "tangsel"
          COLOR 0 0 120
          OUTLINECOLOR 0 0 0
      END
  END

END
=============================================================


========================"index.html"=============================
var map;

function init() {
        map = new OpenLayers.Map({
                div: "map",
                projection: "EPSG:4326",
                displayProjection: "EPSG:4326",
                controls: [
                        new OpenLayers.Control.Navigation(),
                        new OpenLayers.Control.PanZoomBar(),
                        new OpenLayers.Control.ScaleLine(),
                        new OpenLayers.Control.MousePosition(),
                        new OpenLayers.Control.KeyboardDefaults()
                ]

        });

        // create Google Mercator layer
        var gphy = new OpenLayers.Layer.Google(
                "Google Physical",
                {type: google.maps.MapTypeId.TERRAIN}
        );

        // create Mapserver layer
        var msv = new OpenLayers.Layer.MapServer( "SHP",
                "http://localhost/cgi-bin/mapserv.exe";,
                {map: 'e:/ms4w/ppgt/map/tangsel.map'},
                {layers: 'tangsel', srs: 'EPSG:4326', isBaseLayer: false, 
visibility: true},
                {gutter: 15}
        );

        // Key Map
        var keymap = new OpenLayers.Control.OverviewMap({
                maximized: true,
                maximizeTitle: 'Show the overview map',
                minimizeTitle: 'Hide the overview map'
        });
        map.addControl(keymap);

        map.addLayers([gphy, msv]);
        map.setCenter(new OpenLayers.LonLat(106.716677,
-6.295165).transform('EPSG:4326', 'EPSG:3857'), 11);
        map.addControl(new OpenLayers.Control.LayerSwitcher());
}
=============================================================

does someone know what the problem is?
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to