[mapserver-users] mapserver map as wms in google maps - update?
zach cruise
zachc1980 at gmail.com
Thu Jun 4 12:56:02 PDT 2009
great site jennifer! unfortunately i can't use tilecache locally
because of python.
On Thu, Jun 4, 2009 at 2:58 PM, Jennifer Shanks <shanksje at yahoo.com> wrote:
>
> Hi Zach,
>
> Here's a link to a blog post written by Christopher Schmidt that describes steps for using MapServer WMS and TileCache for generating tiles and displaying them on a Google map:
> http://crschmidt.net/blog/311/using-tilecache-with-google-maps-and-virtual-earth/
>
> The advantage of using TileCache is the load on your server will be much lighter. If tiles for a requested area have already been generated, they will be served up. If the tiles do not yet exist, they'll be generated and cached.
>
> Here's a site that I created following the steps in the blog post:
> www.parkinfo.org
>
> Here's the map javascript I use for loading the a TileCache layer. I use GTileLayers rather than GTileLayerOverlays so that I can create a custom map type with my data layers beneath the Google roads and labels.
>
> //create the tile layer
> var tileParks = new GTileLayer(null,null,null,{
> tileUrlTemplate: 'http://www.parkinfo.org/tilecache/tilecache.py/1.0.0/parkinfo_parks/{Z}/{X}/{Y}.png?type=google',
> isPng:true});
> tileParks.getOpacity = function() { return .6; }
>
> //create a custom satellite map type with imagery on the bottom, parks tile on top of that, and roads places labels on top.
> lyr_parks_sat=[G_HYBRID_MAP.getTileLayers()[0],tileParks,G_HYBRID_MAP.getTileLayers()[1]];
> lyr_sat=[G_HYBRID_MAP.getTileLayers()[0],G_HYBRID_MAP.getTileLayers()[1]];
> parkssat = new GMapType(lyr_parks_sat, G_NORMAL_MAP.getProjection(), "Satellite", {errorMessage:"Data currently unavailable"});
>
> map.addMapType(parkssat);
>
> Hope this helps,
> Jennifer
>
>
>
> ----- Original Message ----
> From: zach cruise <zachc1980 at gmail.com>
> To: mapserver-users at lists.osgeo.org
> Sent: Thursday, June 4, 2009 1:28:23 PM
> Subject: [mapserver-users] mapserver map as wms in google maps - update?
>
> i can show mapserver wms in google earth. and i can find a lot of
> online resources to show mapserver wms in google maps, like
> http://roadlessland.org/notes/wms-shapefile-example.html,
> http://n2.nabble.com/Serving-WMS-in-Google-Maps-using-nested-layers-td1989615.html,
> but it's a little confusing.
>
> what's the most up-to-date recommendation considering all upgrades?
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list