[OpenLayers-Users] Issue with OL-2.2 release

Curtis W. Ruck ruckc at yahoo.com
Sat Nov 25 23:11:11 EST 2006


I am trying to get google maps to show up under some gps track logs that are stored in a postgis database.

I modified google.html that comes in the examples/ folder to use my WMS server instead of whatever it was set to

My MAP file for MapServer is setup fairly basic and is shown at the bottom of this msg.

My modified google.html is shortly following.

The issue i am having though is that in IE 7, the WMS layer is non-transparent overtop the GoogleMaps layer(s).
In firefox the WMS layer isn't visible at all even though the layer is checked in the layer selector.  It also pulls the image from my mapserver but doesn't display it over the google maps.

I'd appreciate any suggestions.

Curtis

GOOGLE.HTML---------------------------------

  <head>
    <style type="text/css">
    #map {
        width: 100%;
        height: 100%;
        border: 1px solid black;
        background-color: red;
    }

    body {
        margin: 0px;
        padding: 0px;
    }
    </style>

    http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAR368KGH7sEpRSGVuyx9bqhQ6T14TsMnNzsQ2T02NPhpUqvH4JxTK1LZBrKRLBfC6g-XZbGjPbmWGvA</a>'>
    <script src="lib/OpenLayers.js"></script>
    <script type="text/javascript">
        <!--
        var lon = 5;
        var lat = 40;
        var zoom = 17;
        var map, layer;

        function init(){
            map = new OpenLayers.Map( $('map') , 
            { controls: [new OpenLayers.Control.MouseDefaults()] , 'numZoomLevels':20});

            var satellite = new OpenLayers.Layer.Google( "Google Satellite" , {type: G_SATELLITE_MAP, 'maxZoomLevel':18} );
            var hybrid = new OpenLayers.Layer.Google( "Google Hybrid" , {type: G_HYBRID_MAP, 'maxZoomLevel':18} );

            map.addLayers([satellite,hybrid]);
             var tracklog = new OpenLayers.Layer.WMS.Untiled( "Track Log", "http://lappie/cgi-bin/mapserv?", 
                 {map: '/www/kismet/tracklog.map', transparent:'true', layers: 'Track Log',srs:'EPSG:4326', 'format':'gif'},{
                     isBaseLayer:false } );
            map.addLayer(tracklog);

            map.setCenter(new OpenLayers.LonLat(-98.47,29.49), 15);
            map.addControl( new OpenLayers.Control.LayerSwitcher() );
            map.addControl( new OpenLayers.Control.PanZoomBar() );

        }
        
    // -->

    </script>
  </head>
  <body onload="init()">
    <div id="map"></div>
  </body>
</html>


MAPFILE--------------------------------------------------------------------------
MAPFILE--------------------------------------------------------------------------
MAPFILE--------------------------------------------------------------------------

MAP
    NAME "Track Log WMS"
    IMAGETYPE gif
    UNITS dd
    IMAGECOLOR 255 255 255
    PROJECTION 
        "init=epsg:4326"
    END
    
    WEB
        METADATA
            "wms_title"           "Track Log WMS"
            "wms_onlineresource"  "http://lappie/cgi-bin/mapserv?map=/www/kismet/tracklog.map&"
            "wms_srs"             "EPSG:4326"
        END
    END
    
    OUTPUTFORMAT
        NAME png
        DRIVER "GD/PNG"
        MIMETYPE "image/png"
        IMAGEMODE PC256
        EXTENSION "png"
        TRANSPARENT on
    END
    
    OUTPUTFORMAT
        NAME gif
        DRIVER "GD/GIF"
        MIMETYPE "image/gif"
        IMAGEMODE PC256
        EXTENSION "gif"
        TRANSPARENT on
    END
    
    LAYER 
        NAME "Track Log"
        CONNECTION "user=password password=password dbname=deathstar host=localhost"
        CONNECTIONTYPE postgis
        DATA "point from track_log"
        TYPE point
        STATUS on
        
        METADATA
            "wms_title" "Track Log"
        END
        
        CLASS
            STYLE
                SYMBOL "circle"
                SIZE 5
                COLOR 255 0 0 
            END
        END
    END
    
    SYMBOL
        NAME "circle"
        TYPE ellipse
        FILLED true
        POINTS
            1 1
        END
    END
END

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20061125/272650d7/attachment.html


More information about the Users mailing list