Home > Articles

  • Print
  • + Share This
Like this article? We recommend Running the Mobile Map Apps in Emulators of Eclipse and Xcode

Running the Mobile Map Apps in Emulators of Eclipse and Xcode

Now that I've walked you through the essentials of how to embed a Google JavaScript map inside native mobile applications, let me show you what you can expect to see when you build and run your applications.

To create your Android app, you may have used the Eclipse integrated development environment (IDE) to build and run your app in its emulator. Figure 1 shows an example of what happens when you follow the steps in this tutorial and then click the Run button.

Figure 1 Android mapping app in Eclipse.

On top of your project view, with code in the background, you'll see an emulator displaying your map. In Figure 1, notice that I added more features to the basic map developed earlier in this article. My enhanced map shows New York City subway stations near the Google office, as well as a marker with my picture and an info window pop-up. But even as my embedded map grows more sophisticated, my native Android code remain as simple as ever. This is a direct benefit of the separation of mapping logic from the native code of this design, as I explained earlier.

For iPhone apps, follow the steps outlined in the tutorial "Google Maps API V3: Developing Native iPhone Applications." Then click Build and Go, and Xcode will build your application, launch the iPhone Emulator, and display the same NYC transit map (see Figure 2). Again, the native Objective-C code (highlighted in the viewDidLoad method in the Xcode background of Figure 2) doesn't need to change at all when you update and enhance your map.

Figure 2 iPhone mapping app in Xcode.

  • + Share This
  • 🔖 Save To Your Account