Mark B. – tech

Google Map (Part 2) – Map Type & UI Control

Macam – macam map type untuk Google Maps :

  • G_NORMAL_MAP displays the default road map view.
  • G_SATELLITE_MAP displays Google Earth satellite images.
  • G_HYBRID_MAP displays a mixture of normal and satellite views.
  • G_DEFAULT_MAP_TYPES contains an array of the above three types, useful for iterative processing.
  • G_PHYSICAL_MAP displays a physical map based on terrain information.

Untuk men-set MapType yang digunakan :

var map = new GMap2(document.getElementById("map_canvas"));
map.setMapType(G_SATELLITE_MAP);

UI Control yg tersedia dalam Google Maps :

  • GLargeMapControl3D – a large pan/zoom control as now used on Google Maps. Appears in the top left corner of the map by default.
  • GLargeMapControl – a simpler large pan/zoom control. Appears in the top left corner of the map by default.
  • GSmallMapControl – a smaller pan/zoom control. Appears in the top left corner of the map by default.
  • GSmallZoomControl3D – a small zoom control (with no panning controls) as now used on Google Maps.
  • GSmallZoomControl – a small zoom control (no panning controls) used in the small map blowup windows used to display driving directions steps on Google Maps.
  • GScaleControl – a map scale
  • GMapTypeControl – buttons that let the user toggle between map types (such as Map and Satellite)
  • GHierarchicalMapTypeControl – a selection of nested buttons and menu items for placing many map type selectors.
  • GOverviewMapControl – a collapsible overview map in the corner of the screen
  • GNavLabelControl – a dynamic label indicating the “address” of the current viewport, appropriate to zoom level.

Untuk menambahkan pada map :

var mapControl = new GMapTypeControl();
Map.addControl(mapControl);

Advertisements
This entry was published on April 18, 2011 at 4:49 am and is filed under IT - Tutorial. Bookmark the permalink. Follow any comments here with the RSS feed for this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: