Open GoogleCodeExporter opened 9 years ago
Can't really do anything without Google changing the API
Original comment by sam.stra...@gmail.com
on 28 Nov 2007 at 12:24
[deleted comment]
Maybe I can fix it:
http://googlemapsapi.blogspot.com/2007/12/v294-terrain-and-new-maptypecontrol-to
.html
v2.94: Terrain and a New MapTypeControl to show it off!
Friday, December 07, 2007 at 11:03:00 AM
Posted by Pamela Fox, Maps API Team
As announced on the Google Lat Long Blog last week, Google Maps has added a new
Terrain map type that displays physical features and, quite frankly, is just
dang
pretty to look at. If you haven't tried it out yet, search for Mount Everest,
the
Grand Canyon, Glacier Bay National Park, or any other place that's suffered
(enjoyed?) the natural forces of erosion and tectonic activity. We didn't
enable the
Terrain map type by default in the API as we didn't want to "surprise"
developers and
suddenly pop a new button on your maps, but we have made it very easy to add
this
type. Just insert code like this after initializing GMap2 to get a Terrain
button on
your map: map.addMapType(G_PHYSICAL_MAP);
In addition to the new map type, another subtle change was made to the Google
Maps
interface: the Hybrid button was removed, and was replaced with a drop-down menu
under the Satellite button with a Show Labels checkbox. This new UI reflects
the fact
that the hybrid layer really just consists of satellite tiles combined with a
transparent tile layer of information from the standard map tiles. We've
released
this new UI functionality to developers within the GHierarchicalMapTypeControl.
The
new control defines functions to add relationships to the control so you can
specify
how these drop-down lists will appear. For information on how to set up these
relationships, see Modifying the Makeup of Standard Controls in the API
documentation.
For those who want to mimic the current maps UI, just replace your
GMapTypeControl
object with a GHierarchicalMapTypeControl object — the existing
G_SATELLITE_MAP/G_HYBRID_MAP relationship is specified by default. For those
who want
to use this control for their custom maps, however, you can clear the defaults
and
specify whatever relationships make sense for you.
As an example, I used the awesome Google Maps Creator java application from
UCL-CASA
to turn freely available ESRI SHP files into tile layers. After getting the
custom
map API code generated automatically by the application for all my layers, I
combined
them into one map and added in the new map type control. The result is a map
with a
drop-down that lets you switch between the four tile layers (various data for
San
Francisco county). Try it out below — and hopefully you'll be inspired to use
the
control for your own custom maps! As always, please post questions in the
forum.
Original comment by sam.stra...@gmail.com
on 19 Dec 2007 at 12:41
[deleted comment]
[deleted comment]
[deleted comment]
Original comment by sam.stra...@gmail.com
on 25 Mar 2008 at 4:19
Original comment by sam.stra...@gmail.com
on 5 Apr 2008 at 2:17
Original issue reported on code.google.com by
sam.stra...@gmail.com
on 27 Nov 2007 at 8:42