We've had several new feature announcements for the Google Maps API in the last few months, including high resolution static maps, the new Street View Image API, and the use of high DPI map tiles in the JS Maps API on mobile devices. I'm here to give you some tips for using these new features to improve your existing mobile JS map app .
And again, if you're still using the deprecated v2 Google Maps API in any of your apps (mobile or otherwise), it's time to migrate your app to the v3 Google Maps API, as we're more than halfway through the three year deprecation period.
Posted by Andrés Ferraté, Developer Relations, Google Maps API
Hi, my name is Björn Brala. In the last two years, I've been working on GeoStart, a framework based on the Google Maps API. In that time, the developer community has been an invaluable source of information and help.
When the Google Maps API V3 was released, we were asked to port V2 utility libraries over to work with V3. Since I enjoy challenges, I decided to port over the MarkerManager library. After some rigorous testing and help from Daniel Lee, one of Google's Developer Programs Engineers supporting Geo APIs, I succeeded!
For those who are not familiar with MarkerManager, it's a class originally created by Doug Ricket that manages the additions and removals of many markers when the viewport changes.
Since real code can sometimes speak a thousand words, here's a basic Weather Map example which uses the MarkerManager class. This map creates a random collection of weather markers. When you zoom in, more weather markers are displayed to show more detailed local weather.
If you want to see more examples coupled with detailed explanations on how to use the code, visit the examplespage and the reference guide, which are both hosted in the Google Maps Utility Library V3 project.
I'm Gary Little, a realtor in the small town of Sechelt, British Columbia, located about 40 minutes by ferry from Vancouver. Before returning to Canada a few years ago, I worked for many years in Silicon Valley at Apple Inc. and Sun Microsystems, Inc.
I'm known around here as "Map Guy", not only for my numerous interactive maps but also my collection of antique paper maps of the west coast of North America. I've even got a car with MAP GUY plates!
My most prolific mapping project to date has been an interactive map application that shows the locations of all MLS-listed properties for sale on the Sunshine Coast (an area about 50 miles long with Sechelt at the center). You can see the application at map.garylittle.ca. I recently rewrote and simplified this application so that it works well on iPhone and Android phones. This meant migrating to theV3 Maps API. One problem I faced was that there was no easy way to create and display a custom info window when a property's marker was clicked.
To solve this problem I created a class called InfoBox. You use it just as you would a google.maps.InfoWindow but it supports several additional properties for controlling the styling of the box. You can also use an InfoBox as a map label, so it's useful for identifying landmarks that are not on the base map. InfoBox is now part of the google-maps-utility-library-v3.
The image below shows an InfoBox from my V3 real estate map at imap.garylittle.ca. It's a simple yellow box with a small arrow pointing to the property's location. A flashier box could easily be displayed through creative use of CSS styles.
To learn more about InfoBox, read the class reference and check out the examples.
Just in time for your holiday coding enjoyment, we have three new articles to get you started on adding maps to mobile and using App Engine for spatial search.
Overview of Mobile Development Options for the Google Maps APIPutting a map on a phone seems natural these days. This article goes over the options for developing a Google Map for a mobile application.
Loading a Maps API site in a Native Android ApplicationGoogle Maps API Version 3 was designed to be used in a mobile environment. If you want to include a V3 page in a native Android application, this is how to get started.
Geospatial Queries with Google App Engine using GeoModelMany developers are moving their applications to cloud computing. Here's how to get started with geospatial queries building on Google App Engine.
So enjoy your holidays, and I look forward to seeing your apps in January!
Give us feedback in our Product Forums.