Smashinglabs

Sebastian Poręba's blog

Migration guide

If you have used gMap 1.1.0 with Google Maps API V2 you have to adjust your code to make it work correctly with V3.

No Google API key anymore!

Simply include API anywhere you want:

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

Changed controls control

If you want to add/remove default controls, don't use controls array anymore. Instead there are boolean flags in config. Please check documentation for description.

    mapTypeControl:         false,
    zoomControl:            false,
    panControl:             true,
    scaleControl:           true,
    streetViewControl:      false,  

Changed map type

Since Google has moved to more object oriented code, you have to use different map types now.

V2 typeV3 type
G_NORMAL_MAPgoogle.maps.MapTypeId.ROADMAP
G_SATELLITE_MAPgoogle.maps.MapTypeId.SATELLITE
G_HYBRID_MAPgoogle.maps.MapTypeId.HYBRID
G_PHYSICAL_MAPgoogle.maps.MapTypeId.TERRAIN
Please refer to Google Maps API for more information.

That's all!

No more changes. Markers, geolocation, icons, etc. are working just fine without any modifications.

What's new and what's the point?

V3 is there since 2009 and it supports HTML5 geolocation, touch devices and, most important, is still improving, in contrary to good old V2.

  • RSS
  • Facebook
  • Twitter

FAQ about Wordpress

This came as a surprise for me but gMap is ...

gMap 3.3.3 released

It was a looong time since I last visited gMap. ...

Talks for Google Dev

Two new slide decks appeared in lectures tab. This time with ...

Talks and lectures w

Every now and then I spend a weekend watching various ...

3D Tetris with Three

In the fifth part of tutorial we add some final ...

FAQ about Wordpress

This came as a surprise for me but gMap is ...

gMap 3.3.0 released

Christmas came early! New version of gMap is ready!

Lecture for GTUG: Ja

Today I gave a lecture for GTUG Krakow about optimizations in ...

Unit testing for jQu

In part 1 I described basics of unit testing in ...

Unit testing for jQu

In part 1 I described some basic concepts behind unit ...