Issue with OL-2.2 release

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue with OL-2.2 release

Curtis W. Ruck
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>

    <script src="%3Ca%20target=" _blank="" href="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAR368KGH7sEpRSGVuyx9bqhQ6T14TsMnNzsQ2T02NPhpUqvH4JxTK1LZBrKRLBfC6g-XZbGjPbmWGvA">http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAR368KGH7sEpRSGVuyx9bqhQ6T14TsMnNzsQ2T02NPhpUqvH4JxTK1LZBrKRLBfC6g-XZbGjPbmWGvA</a>'></script>
    <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

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Issue with OL-2.2 release

Curtis W. Ruck
Just got it fixed by help in #openlayers on freenode

I was suggested to add this to my init() as the image was never getting its style display changed from none

OpenLayers.Tile.Image.prototype = OpenLayers.Class.inherit( OpenLayers.Tile.Image, { checkImgURL: function() {} });

----- Original Message ----
From: Curtis W. Ruck <[hidden email]>
To: [hidden email]
Sent: Saturday, November 25, 2006 10:11:11 PM
Subject: [OpenLayers-Users] Issue with OL-2.2 release

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>

   
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users