Custom tiles in v3

86 views
Skip to first unread message

bory

unread,
Oct 15, 2010, 6:51:17 AM10/15/10
to Google Maps JavaScript API v3
Hello to all!

I want to load custom tiles on map which I got from cutting *.tif
pictures in Global Mapper. So far I have all tiles I need. These tiles
are organized in folders(...path.../zoom/y/x.png) where "zoom" and "y"
are folders and "x" is actual PNG file. Global Mapper also generates
*.html document, which shows the tiles on map v2. I would like to use
this tiles with maps v3. I didn't found any simple example which would
show how to use custom tiles in maps v3. If anyone has some experience
in this direction or any samples, please let me know.

Thank you!

Joseph Elfelt

unread,
Oct 15, 2010, 9:08:56 AM10/15/10
to Google Maps JavaScript API v3

Martin

unread,
Oct 15, 2010, 9:43:56 PM10/15/10
to Google Maps JavaScript API v3

Kesuke

unread,
Oct 16, 2010, 2:37:49 PM10/16/10
to Google Maps JavaScript API v3
On a side note - if you plan to use a large number of custom .png
tiles on your map try using pngcrush (available from sourceforge). I
was able to reduce 135mb of .png tiles down to 45mb - not bad for
lossless compression. Faster load times + cheaper bandwidth.

bory

unread,
Oct 18, 2010, 9:02:49 AM10/18/10
to Google Maps JavaScript API v3
Thank you all for fast responses!

Today I made page ( http://poplave.geoin.si/v3/ ). It shows custom
tiles of recent floods in Slovenia. It's fine for first time ;)

@Kesuke : I will definetly take a look at this pngcrush! Thank you!

For further development.. In Maps v2,it was possible to get roads
layer with something like this:

var layers = G_HYBRID_MAP.getTileLayers();
var bla=layers[1]; // a reference to the upper tile layer of the
hybrid map

Is something like this possible in Maps v3?


On Oct 16, 8:37 pm, Kesuke <Nick_dai...@hotmail.com> wrote:
> On a side note - if you plan to use a large number ofcustom.pngtileson your map try using pngcrush (available from sourceforge). I
> was able to reduce 135mb of .pngtilesdown to 45mb - not bad for
> lossless compression. Faster load times + cheaper bandwidth.
>
> On Oct 15, 11:51 am, bory <boris.rebs...@gmail.com> wrote:
>
> > Hello to all!
>
> > I want to loadcustomtileson map which I got from cutting *.tif
> > pictures in Global Mapper. So far I have alltilesI need. Thesetiles
> > are organized in folders(...path.../zoom/y/x.png) where "zoom" and "y"
> > are folders and "x" is actual PNG file. Global Mapper also generates
> > *.html document, which shows thetileson map v2. I would like to use
> > thistileswith maps v3. I didn't found any simple example which would
> > show how to usecustomtilesin maps v3. If anyone has some experience

Esa

unread,
Oct 18, 2010, 10:15:36 AM10/18/10
to Google Maps JavaScript API v3
You could make a custom maptype using those tiles of upper layer of
hybrid maptype. Like lyrs=h in this old example:
http://koti.mbnet.fi/ojalesa/v3/osm_dual.htm

I think you can reach even better results with Styled Maps of v3:
http://code.google.com/apis/maps/documentation/javascript/maptypes.html#StyledMaps
Reply all
Reply to author
Forward
0 new messages