Would you like to tell us how we are doing?

You bet No thanks

Mapping Support

mappingsupport_android_api_top_image

 

The BlackBerry Runtime for Android apps supports location based intents to display Google Maps. Once triggered, these intents are converted into web intents that carry the corresponding URL for Google Maps to be displayed in the browser. The following intent URIs are currently supported:

geo:latitude,longitude
geo:latitude,longitude?z=zoom
geo:0,0?q=address+business+or+keywords

Instead of launching a location intent, you can instantiate a WebView and load the URL of the Google Maps mobile website. You can add parameters to the URL which will allow you to use more functionality than is available using the Java based Google Maps API.

 

The following sample demonstrates how you can instantiate a WebView to display a mobile Google Maps URL with parameters in an Android application. The main activity of your application should contain the following lines in its onCreate() method:

@Override
public void onCreate(Bundle savedInstanceState) {
      
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
      
      WebView webView = (WebView) findViewById(R.id.mywebview);
      webView.getSettings().setJavaScriptEnabled(true);
      webView.loadUrl("http://maps.google.com/?ll=36.97,
                      -122&lci=bike&z=13&t=p");
      }

The following table highlights some of the differences in functionality between using Google Maps Java API and using the URL parameters of Google Maps.

 

Feature

Google Maps Java API

URL Parameters of Google Maps

Available Map types and customization

Road

Satellite

Custom projections

Road

Satellite

Hybrid

Terrain

UI controls

Zoom

Zoom

Query input field

Layers

Current location

Get Directions

Places

Overlays

Built-in overlay types are not available; developers implement their own

Markers

Layers

Traffic

Bicycling

Traffic

Transit

YouTube

Wikipedia

Panoramio

Direction service

Not available

Source/destination query

Intermediate addresses

Travel mode (driving, bicycling, walking)

Unit systems

Departure and arrival times for transit

Geocoding service

Not part of the mapping library; done via a separate Google service for Android (not available in BlackBerry Runtime for Android apps)

Keyword query support

Nearby location

Search mode (businesses, mapped web pages, real estate, etc.)

A Java based mapping API library and Geocoding API for Google Maps are not currently available.