[mapguide-users] re: mapguide wms on google maps

girish kumar bv girish778 at rediffmail.com
Fri Sep 25 03:43:28 EDT 2009


I am trying to overlay mapguide wms layer on google maps,to some extent i am succesful but multiple tiles are getting displayed on google maps rather than one of the layer to be displayed(image attached).any help is appreciated. here is my code





Google/MapServer Tile Example

			



function load() {
  if (GBrowserIsCompatible()) {
    var urlTemplate = 'http://localhost/mapguide/mapagent/mapagent.fcgi?';
        urlTemplate += 'REQUEST=GetMap';
        urlTemplate += '&SERVICE=WMS';
        urlTemplate += '&LAYERS=MetDist/Layers/india_border';
        urlTemplate += '&FORMAT=image/png';
        urlTemplate += '&BGCOLOR=0xFFFFFF';
		 urlTemplate += '&TRANSPARENT=TRUE';
		  urlTemplate += '&SRS=EPSG:4326';
		   urlTemplate += '&BBOX=68.106064,6.760338,97.415349,37.073669';
		    urlTemplate += '&WIDTH=596';
			 urlTemplate += '&HEIGHT=517';
			
			 
    var myLayer = new GTileLayer(null,0,18,{
                                 tileUrlTemplate:urlTemplate,
                                 isPng:true,
                                 opacity:0.8
								 });
								  
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng(23.000000,80.000000), 4);
    map.addOverlay(new GTileLayerOverlay(myLayer));
  }
}




  









































-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090925/79857d70/attachment.html


More information about the mapguide-users mailing list