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

3D Tetris with Three

[include file="ThreejsTetrisMenu.php"] Joined or separated? Think about the way we play Tetris. ...

3D Tetris with Three

[include file="ThreejsTetrisMenu.php"] Preparation First you need to download Three.js: https://github.com/mrdoob/three.js I also use Stats ...

gMap 3.3.0 released

As always, you can download it from github. I had a ...

JavaScript performan

Trace JIT is no more I was surprised by the news that trace ...

Lecture for GTUG: Ja

My main topics were: Optimization in general DOM Reflow/repaint Garbage collector JIT Google Closure (Compiler/Tools/Library) You can ...

gMap 3.3.0 released

As always, you can download it from github. I had a ...

Lecture for GTUG: Ja

My main topics were: Optimization in general DOM Reflow/repaint Garbage collector JIT Google Closure (Compiler/Tools/Library) You can ...

Unit testing for jQu

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

Unit testing for jQu

There are few testing frameworks dedicated for frontend that are ...

What do we need for

Contents Better graphics Involve desktop game developers Easier animations Code like in C++ Fix WebGL Write ...