codesite-noreply at google.com
2010-May-18 08:43 UTC
[Mapstraction] [mapstraction] r78 committed - ...
Revision: 78 Author: freyfogle Date: Tue May 18 01:43:07 2010 Log: applying patch from Lev Tsypin to allow physical/terrain type for google and googlev3 http://code.google.com/p/mapstraction/source/detail?r=78 Modified: /trunk/source/mxn.core.js /trunk/source/mxn.google.core.js /trunk/source/mxn.googlev3.core.js ======================================--- /trunk/source/mxn.core.js Wed Feb 10 16:35:50 2010 +++ /trunk/source/mxn.core.js Tue May 18 01:43:07 2010 @@ -162,6 +162,7 @@ Mapstraction.ROAD = 1; Mapstraction.SATELLITE = 2; Mapstraction.HYBRID = 3; +Mapstraction.PHYSICAL = 4; // methods that have no implementation in mapstraction core mxn.addProxyMethods(Mapstraction, [ ======================================--- /trunk/source/mxn.google.core.js Wed Jan 27 15:59:15 2010 +++ /trunk/source/mxn.google.core.js Tue May 18 01:43:07 2010 @@ -227,6 +227,9 @@ case mxn.Mapstraction.HYBRID: map.setMapType(G_HYBRID_MAP); break; + case mxn.Mapstraction.PHYSICAL: + map.setMapType(G_PHYSICAL_MAP); + break; default: map.setMapType(type || G_NORMAL_MAP); } @@ -242,6 +245,8 @@ return mxn.Mapstraction.SATELLITE; case G_HYBRID_MAP: return mxn.Mapstraction.HYBRID; + case G_PHYSICAL_MAP: + return mxn.Mapstraction.PHYSICAL; default: return null; } ======================================--- /trunk/source/mxn.googlev3.core.js Sat May 1 18:49:36 2010 +++ /trunk/source/mxn.googlev3.core.js Tue May 18 01:43:07 2010 @@ -223,6 +223,9 @@ case mxn.Mapstraction.HYBRID: map.setMapTypeId(google.maps.MapTypeId.HYBRID); break; + case mxn.Mapstraction.PHYSICAL: + map.setMapTypeId(google.maps.MapTypeId.TERRAIN); + break; default: map.setMapTypeId(google.maps.MapTypeId.ROADMAP); } @@ -238,8 +241,8 @@ return mxn.Mapstraction.SATELLITE; case google.maps.MapTypeId.HYBRID: return mxn.Mapstraction.HYBRID; - //case google.maps.MapTypeId.TERRAIN: - // return something; + case google.maps.MapTypeId.TERRAIN: + return mxn.Mapstraction.PHYSICAL; default: return null; }