Tagged: google maps Toggle Comment Threads | Keyboard Shortcuts

  • pit 10:13 am on February 25, 2010 Permalink | Reply
    Tags: , , google maps, ,   

    MidMaps: new Google Maps API for J2ME 

    I finally found some time to finish and publish the first release of a tiny library that allow to easily integrate Google Maps in every J2ME application: MidMaps.

    You can read all the details, download the library together with sample code, and read the full JavaDocs here: MidMaps – J2ME Google Maps library.

     
    • yama 10:05 am on April 22, 2010 Permalink

      i am using your library.yours is a nice application but the only problem is that it shows path as a straight line instead of road to road view.please help me out with a solution that how should i show such road to road path in my application.Thanking you.

    • Nicholas Ndegwa 9:41 am on January 1, 2011 Permalink

      Hi I like your API it works perfectly on the SUN emulator but does not work on the Nokia emulator nor Nokia device am getting the following error.

      map error:1000, java.io.IOException: Error in

    • Umesh 7:45 am on March 15, 2011 Permalink

      can we add important location like hotels,historical monuments, etc to static maps.

    • azura 4:01 pm on April 13, 2011 Permalink

      thnks for share :) i will practice it dude

    • Dileep 10:47 am on October 31, 2011 Permalink

      i am used to your library. but It give the
      java.lang.InstantiationException: Class not a MIDlet
      at com.sun.midp.midlet.MIDletState.createMIDlet(+66)
      at com.sun.midp.midlet.Selector.run(+22)
      Unable to create MIDlet DisplayMap

      How to i solve this problem.. Help me..

  • pit 8:31 am on February 1, 2010 Permalink | Reply
    Tags: , , google maps,   

    Using Google Static Maps in your widget with JavaScript 

    A new featured article from Ar.tur on Forum Nokia Wiki shows you how to use the static version of Google Maps in your mobile widget by using few lines of JavaScript code.

    The same article also shows how to use the Location API from Web Runtime Platform Services to retrieve your current location, and then using this data to get the appropriate map from Google Maps.

    You can read the full article here: Static GoogleMaps API in JavaScript.

     
  • pit 1:29 pm on September 22, 2009 Permalink | Reply
    Tags: city guides, , , google maps, , ,   

    Go Local widget now available on the Ovi Store! 

    Go Local is a new Web Runtime widget (already available for the Betavine platform) that helps you to find and manage points of interests (e.g.: museums, pubs, restaurants) that are nearby.

    Once you’ve found what you’re looking for, Go Local features allow you to:

    • place a call to the location
    • save it to your phonebook
    • view it on Google Maps
    • get to it easily (routing)
    • send it to a friend, by email or SMS
    • share it on Twitter
    • save it for offline usage

    Go Local is currently available for devices with 240×320 and 320×240 display resolutions.

    You can download Go Local for your WRT-enabled device here: Ovi Store Go Local page.

     
  • pit 10:50 am on August 26, 2009 Permalink | Reply
    Tags: , , google maps, , , ,   

    New Betavine widget: find your way with Go Local! 

    A new widget for the Betavine platform is now available: It’s called Go Local, and allows you to search for anything that’s nearby (restaurants, museums, pubs, and everything else).

    Once you’ve found what you’re looking for, you can:

    • place a call to the location
    • save it to your phonebook
    • view it on Google Maps
    • get to it easily (routing)
    • send it to a friend, by email or SMS
    • share it on Twitter
    • save it for offline usage

    You can download Go Local here: Betavine Go Local download.

     
  • pit 1:46 pm on June 12, 2008 Permalink | Reply
    Tags: , google maps, google static maps, , ,   

    Displaying GPS position in FlashLite using Google Static Maps and KuneriLite 

    Today’s tutorial is about using Google Maps static images, and GPS data, to display maps in a FlashLite application using KuneriLite.

    FlashLite KuneriLite Google Maps application screenshot

    Prerequisites

    Get your own Google Maps API key

    To use Google Maps services, you should have a Google Maps API key. If you do not have one, you can go here:

    http://code.google.com/apis/maps/signup.html

    and signup for your API key.

    Download and install KuneriLite

    KuneriLite is a tookit that extends FlashLite capabilites allowing applications to access native Symbian functionalities, like file writing, or reading GPS data.

    To proceed in this tutorial, you must download and install KuneriLite: KuneriLite download page.

    Create FlashLite application

    Create your FlashLite movie

    In this example, we’ll use FlashLite 2.1, but porting it to other (older or newer) FlashLite versions will be quite straightforward. So, after you’ve created an empty FlashLite movie, follow this simple steps:

    • Create a Button by going to Insert -> New Symbol…
    • enter GpsButton as name
    • check the Export for ActionScript and Export in first frame checkboxes

    GpsButton properties

    • Now, design your Button as you prefer, for example placing a big “Find me!” label on it
    • After you’ve finished designing your Button, place it on movie root, in the lower part of the stage, as in the attached screenshot, and give it startButton as Instance Name

    Place GpsButton on stage

    Enter ActionScript code

    On movie root, create a new layer called Actions, and open its ActionScript editor. We’ll start defining some properties:

    // Enter your api key here
    var apiKey = 'API_KEY';
     
    //If you're using non-commercial version of KuneriLite, you'll not need to change this
    var kuneriPath = 'http://127.0.0.1:1001/Basic/';

    Now, we’ll define some useful functions that we’ll use in our code:

    //We'll call this function when some KuneriLite related errors occur
    function kuneriError(error:String)
    {
    	trace("KuneriLite error: " + error);
    }
     
    //This function will do all calls to KuneriLite servers
    //and call the given handler passing response values as argument
    function kuneriLoad(url, handler)
    {
    	var loader:LoadVars = new LoadVars();
     
    	loader.onLoad = function()
    	{
    		handler(this);
    	}
    	trace("LOADING: " + url);
     
    	loader.load(url);
    }

    Now, let’s code the Button-related logic. When the user presses the startButton we want to:

    • start the GPS
    • retrieve the current GPS position
    • display a map centered in the retrieved GPS position

    To get full infos about about KuneriLite GPS plugin, you can check the related Wiki page: http://wiki.kunerilite.net/index.php?title=GPS_plugin

    We begin starting the GPS on gpsButton press, using the start klCommand:

    startButton.onPress = function()
    {
    	kuneriLoad(kuneriPath + 'GPS?klCommand=start', gpsStarted);
    }
    function gpsStarted(res:LoadVars)
    {
    	if(res.klError == 0 || res.klError == -11)
    	{
    		trace("GPS started");
     
    		kuneriLoad(kuneriPath + 'GPS?klCommand=read', gpsDataRead);
    	}
    	else
    	{
    		kuneriError("Error starting GPS!");
    	}
    }

    The gpsStarted() handler will:

    • check if there is no error (klError = 0) or if GPS is already started (klError = -11). For full errors list associated with GPS plugin, check KuneriLite Wiki page: http://wiki.kunerilite.net/index.php?title=GPS_plugin
    • if there’s an error starting the GPS, call our kuneriError() function defined above
    • if GPS is correctly started, it will make a second call to KuneriLite, this time to retrieve current GPS position (klCommand=read)

    This second call to KuneriLite will call gpsDataRead() handler, defined below:

    function gpsDataRead(res:LoadVars)
    {
    	if(res.klError == 0)
    	{
    		if(res.klPosLatitude != undefined)
    		{
    			var lat = res.klPosLatitude;
    			var lng = res.klPosLongitude;
     
    			trace("POSITION: " + lat + ", " + lng);
     
    			loadMap(lat, lng);
    		}
    		else
    		{
    			kuneriLoad(kuneriPath + 'GPS?klCommand=read', gpsDataRead);
    		}
    	else
    	{
    		kuneriError("Error retrieving GPS position!");
    	}
    }

    This handler, as above, will check if there is any error raised by KuneriLite and, if not, will check if latitude and longitude coordinates are available, by checking response klPosLatitude and klPosLongitude property values. If they’re not available, a new call to read klCommand is done, otherwise the following loadMap() function is called.

    function loadMap(lat:Number, lng:Number)
    {
    	var mapClip:MovieClip = _root.createEmptyMovieClip('mapClip', _root.getNextHighestDepth());
     
    	mapClip._x = 0;
    	mapClip._y = 0;
     
    	var mapWidth = 240;
    	var mapHeight = 280;
     
    	var loader:MovieClipLoader = new MovieClipLoader();
     
    	var mapUrl:String = 'http://maps.google.com/staticmap?center=' +
    		lat + ',' + lng + '&format=jpg&zoom=8&size=' +
    		mapWidth + 'x' + mapHeight + '&key=' + apiKey;
     
    	loader.loadClip(mapUrl, mapClip);
    }

    The above function:

    • attaches a new empty movie clip to movie root
    • places it to coordinates (0,0)
    • use a MovieClipLoader to load a 240×280 map image, in jpeg format, in the empty clip

    Done that, you can actually test your FlashLite movie

    Test your FlashLite application

    Test on PC

    To test your application without deploying on real device, you must follow these simple steps:

    • Start KuneriLite emulator with default settings (port: 1001, key: Basic)
    • Start your FlashLite movie
    • Press Find Me! and wait for your image to be loaded (of course, being an emulator, the GPS position will be not real :))

    For more infos about KuneriLite Emulator, you can go here: KuneriLite Emulator Wiki page

    Test on real device

    To test your app on real device, you must package your SIS application using KuneriLite Wizard, following these steps:

    KuneriLite Emulator screenshot

    • Export your FlashLite movie
    • Create a new KuneriLite project
    • Enter application name and other data, checking GPS from the available plugins
    • Check “Use external player” option if you developed for a development player (2.x or 3.x) and would like to launch the application using one of those players
    • It is also recommended to always check “Use stub” option
    • Select the exported SWF as project Main SWF

    Note: to use GPS you should sign your application, specifying certificate, key and password in KuneriLite Wizard interface. Otherwise, your application will not be able to access GPS functionalities.

    For more infos about KuneriLite Wizard, you can go here: KuneriLite Wizard Beginner’s Guide

    Source code and resources

     
    • Ugur 2:16 pm on June 12, 2008 Permalink

      Great tutorial Alessandro, kudos!

      FYI – couldn’t get the ZIP file, gives 404

      cheers,

      Ugur.-

    • Pit 2:20 pm on June 12, 2008 Permalink

      Thanks Ugur!

      I missed a letter in the ZIP name… now It should work :)

      Pit

    • Pasi Manninen 6:49 am on June 14, 2008 Permalink

      Great Tutorial!

      Br,
      Pasi Manninen.

    • senthil kumar 1:55 pm on June 15, 2008 Permalink

      Hi am trying to get microsoft virtual map into my flash lite. How i can get the virtual map into flash lite?

    • Hudarsono 6:40 pm on July 19, 2008 Permalink

      This tutorial uses Symbian, how about android?

    • java.padawan 11:53 pm on February 10, 2009 Permalink

      I created a simple GPS tutorial using android.

      http://www.androidph.com/2009/02/app-10-beer-radar.html

  • pit 1:30 pm on June 11, 2008 Permalink | Reply
    Tags: , google maps, , mobile mapping, static maps   

    Google Maps mobile tutorial is Wiki article of the Month! 

    I’m really honored that another article, published on Forum Nokia Wiki, has been selected as Article of the Month!

    Google Maps article of the month

    As the previous one, this also is related to Google Maps usage in mobile applications, and you can read it here: How to use Google Maps data in mobile applications.

    As its name says, It’s an introductory article on how to use Google Maps services, in particular the geocoding and static maps ones, from a mobile application, where standard Google Maps API code is not suitable (since it is thought for web based and Ajax’d apps). Its content does not focus on any particular programming language, but gives base guidelines to use those services using REST.

    So… any kind of feedbacks is welcome! :)

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel