Tag: latitude

Google Maps on BlackBerry with Landmark

this article from the popular link [1].

basically, google maps on BlackBerry can be start with URL like this:


this is the code snapshot:

int mh = CodeModuleManager.getModuleHandle("GoogleMaps");
if (mh == 0) {
     throw new ApplicationManagerException("GoogleMaps isn't installed");
URLEncodedPostData uepd = new URLEncodedPostData(null, false);
uepd.append("a", "@latlon:"+l.getLatitude()+","+l.getLongitude());
uepd.append("title", l.getName());
uepd.append("description", l.getDescription());
String[] args = { "http://gmm/x?"+uepd.toString() };
ApplicationDescriptor ad = CodeModuleManager.getApplicationDescriptors(mh)[0];
ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, args);
ApplicationManager.getApplicationManager().runApplication(ad2, true);

here is more complete code from [2]:

import net.rim.blackberry.api.browser.URLEncodedPostData;
import net.rim.device.api.system.ApplicationDescriptor;
import net.rim.device.api.system.ApplicationManager;
import net.rim.device.api.system.ApplicationManagerException;
import net.rim.device.api.system.CodeModuleManager;
import net.rim.device.api.ui.component.Dialog;
public class Application extends net.rim.device.api.ui.UiApplication {
        public static void main(String[] args) {
                int mh = CodeModuleManager.getModuleHandle("GoogleMaps");
                if (mh == 0) {
                        Dialog.alert("GoogleMaps isn't installed");
            System.exit( 1 );
//              URLEncodedPostData uepd = new URLEncodedPostData(null, false);
//              uepd.append("action","LOCN");
//              uepd.append("a", "@latlon:"+"35.0000"+","+"105,0000");
//              uepd.append("title", "something");
//              uepd.append("description", "something");
                String[] args1 = { "http://gmm/x?action=LOCN&a=@latlon:
40.03731412913736,116.34973964097298&title=something&description=something"        };
                ApplicationDescriptor ad =
                ApplicationDescriptor ad2 = new ApplicationDescriptor(ad, args1);
                try {
                } catch (ApplicationManagerException e) {
                        // TODO Auto-generated catch block
                        Dialog.alert("Debug ..."+e.getMessage());
            System.exit( 1 );
        Application() {

some one report using address instead of coordinates [3]:

I've been able to avoid the error in 3.0.2 by removing the "@latlon:" tag, as in:

uepd.append("a", l.getLatitude()+","+l.getLongitude());

The other option is to put in the actual address, as in:

uepd.append("a", "1600 Pennsylvania Avenue, Washington DC");

[1] http://www.blackberryforums.com/developer-forum/143263-heres-how-start-google-maps-landmark.html
[2] http://groups.google.com/group/google-maps-api-china/browse_thread/thread/49f72c8082f3caa0
[3] http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=20392

Image Geotagging

Geotagging is the process of adding geographical identification metadata to various media such as photographs, video, websites, or RSS feeds and is a form of geospatial metadata. These data usually consist of latitude and longitude coordinates, though they can also include altitude, bearing, accuracy data, and place names.[1]

Geotagging standards in electronic file formats:

  1. JPEG photos
  2. HTML pages: ICBM method, RDF feeds, Microformat, Wikipedia, Geotagging in tag-based systems & Geoblogging

the most famous API and Application on image geotagging is exiftool. [2]

Geotagging with ExifTool[3]
The ExifTool geotagging feature adds GPS tags to images based on data from a GPS track log file. The GPS track log file is loaded, and linear interpolation is used to determine the GPS position at the time of the image, then the following tags are written to the image:

  • GPSLatitude
  • GPSLatitudeRef
  • GPSLongitude
  • GPSLongitudeRef
  • GPSAltitude
  • GPSAltitudeRef
  • GPSDateStamp
  • GPSTimeStamp

Currently supported GPS track log file formats:

  • GPX
  • NMEA (RMC, GGA, GLL and GSA sentences)
  • KML
  • Garmin XML
  • Magellan eXplorist PMGNTRK

Test Website:

  1. http://regex.info/exif.cgi
  2. http://locr.com

Examples: [4]


EXIF stands for “Exchangeable Image File Format”. This type of information is formatted according to the TIFF specification, and may be found in JPG, TIFF, PNG, MIFF and HDP images, as well as many TIFF-based RAW images, and even some AVI and MOV videos. [5]

Applications based on exiftool:

  • http://geotag.sourceforge.net/?q=node/1
  • http://www.carto.net/projects/photoTools/gpsPhoto/
  • http://studio.messlinger.com/2009/03/08/exiftool-and-the-automator/
  • others [6]

[1] http://en.wikipedia.org/wiki/Geotagging
[2] http://www.sno.phy.queensu.ca/~phil/exiftool/
[3] http://www.sno.phy.queensu.ca/~phil/exiftool/geotag.html
[3][oldlink] http://cpansearch.perl.org/src/EXIFTOOL/Image-ExifTool-7.82/html/geotag.html
[4] http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html
[5] http://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html
[6] http://www.sno.phy.queensu.ca/~phil/exiftool/#links

  • Copyright © 1996-2010 vaks.in. All rights reserved.
    iDream theme by Templates Next | Powered by WordPress