Google maps & Mapserver projection issue

joseolcese jolcese at GMAIL.COM
Fri Jun 1 10:44:53 EDT 2007


Hi 

I'm trying to use Google maps & Mapserver with partial success...
I have a .shp configured in mapserver and I can get a transparent tile from
an html page where it load google satellite view and my tiles.
The problem is that I wasn't using any projection on my .map so every tile
was a little distorted.
I added the epsg:54004 project to the .map but now the tiles are empty.

Do you have any idea why this my be happening?

Thanks
Jose Olcese

.map:
 IMAGETYPE      PNG
 EXTENT           -64.20 -31.41 -64.19 -31.40
 SIZE               256 256
 SHAPEPATH      '/ms4w/apps/tutorial/data_jose'
 FONTSET         '/ms4w/apps/tutorial/fonts/fonts.list'
 TRANSPARENT  ON
 CONFIG PROJ_LIB '/var/www/html/share/proj/'
 PROJECTION
 "init=esri:54004"
 END
  LAYER
...
...


.html:
...
...
        tileCountry.getTileUrl=function(xy,zoom)
        {
            var lng = (-180+((xy.x+0.5)*(360/Math.pow(2,zoom)))); // -180
+180

            var merclat_extent = 360/Math.pow(2,zoom);
            var l = 180 - ((xy.y+0.5) * merclat_extent);
            var e = Math.exp(2 * ( l * Math.PI) /180);
            e = (e - 1)/(e + 1);
            var lat = (Math.atan2(e, Math.sqrt(1 - (e * e))) *180 /
Math.PI);

            return
'http://127.0.0.1/cgi-bin/mapserv?map=/ms4w/apps/tutorial/htdocs/map_test5.map&mode=map&mapxy='
+ lng + '+' + lat + '&buffer=' + ((360/Math.pow(2,zoom))/2);
    }
...



-- 
View this message in context: http://www.nabble.com/Google-maps---Mapserver-projection-issue-tf3852632.html#a10913968
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the mapserver-users mailing list