Non-overlay Google Maps viewer?

290 views
Skip to first unread message

Mendo

unread,
Dec 30, 2009, 11:33:44 PM12/30/09
to MapTiler User Group
Hi, I'm wondering if a non-overlay Google Maps viewer script generator
is planned for MapTiler? For use with non-Earth maps.

klo...@gmail.com

unread,
Jan 11, 2010, 10:41:54 AM1/11/10
to maptiler
Hi Mendo,

> Hi, I'm wondering if a non-overlay Google Maps viewer script generator
> is planned for MapTiler?

No, it is not planned right now, because I don't think there is enough
people who really needs that...
MapTiler is able to generate correct tiles for such use, but the
viewer you should do yourself in JavaScript...

> For use with non-Earth maps.

If you choose in the first step the "raster" profile then MapTiler
generates the OpenLayers viewer for your picture. To create a similar
Google Maps API based viewer is not hard... Here you have a "Flat
Projection" example from and old gdal2tiles:
http://examples.maptiler.org/flat/googlemaps.html

If you would like to use the Mercator tiles generated by MapTiler as a
separate layer instead of the overlay layer, then construct a GMapType
object and add it to the map using the GMap2.addMapType() method.

Details are in the documentation of Google Maps API:
http://code.google.com/apis/maps/documentation/overlays.html#CustomMapTiles

And examples in the pages like:
http://econym.org.uk/gmap/custommap.htm

Klokan Petr Pridal
--
http://blog.klokan.cz/
http://www.maptiler.org/
http://www.oldmapsonline.org/

dylan.k.kuhn

unread,
Jan 13, 2010, 10:49:52 AM1/13/10
to MapTiler User Group
>
> > Hi, I'm wondering if a non-overlay Google Maps viewer script generator
> > is planned for MapTiler?
>
> No, it is not planned right now, because I don't think there is enough
> people who really needs that...
> MapTiler is able to generate correct tiles for such use, but the
> viewer you should do yourself in JavaScript...
>

In the generated googlemaps.html, you can replace these two lines:

overlay = new GTileLayerOverlay( tilelayer );
map.addOverlay(overlay);

with

maptype = new GMapType( [tilelayer], mercator,
"Custom" );
map.addMapType( maptype );

to get a little sample of the possibilities.

-dylan-

Reply all
Reply to author
Forward
0 new messages