Oracle Maps example - Builtin Google Maps tile layer

This demo displays Google Maps as an a built-in map tile layer. You need to apply for a Google Maps API key and use it to load the Google Maps API library as described in the API doc.

Select a map type: Road map Hybrid map Shaded map

Instructions

IMPORTANT NOTE: To use third party maps as an Oracle Maps tile layer, the map usage of your application must meet the terms of service defined by the map service provider.

To add a Google Maps tile layer, you need to first load the Google Maps Javascript API libary into your application web page.

<script src="http://maps.google.com/maps?file=api&v=2&key=[your-Google-Maps-API-key]"
  type="text/javascript"></script>

Then in your application code, you need to create a MVGoogleTileLayer object and add it to the MVMapView instance.

      mapview = new MVMapView(document.getElementById("map"), baseURL);
      baseMap = new MVGoogleTileLayer() ;
      mapview.addMapTileLayer(baseMap);
   
Your application can also invoke the setMapType method to change the map type displayed by the map tile layer.
  <a href="javascript:setMapType(MVGoogleTileLayer.TYPE_ROAD)">Road map
  <a href="javascript:setMapType(MVGoogleTileLayer.TYPE_HYBRID)">Hybrid map
  <a href="javascript:setMapType(MVGoogleTileLayer.TYPE_SHADED)">Shaded map
   
Please refer the API doc for more information on how to use the built-in Google Maps tile layer class MVGoogleTileLayer.