QuickStart

jalamap is a Java Layer over Mappy's V3 HTTP Web Services. jalamap gives to Java developers an easy access to Mappy cartographic services.

Download jalamap

Download jalamap here : http://sourceforge.net/projects/jalamap/files/ . Only jalamap-0.5.jar is needed. You may also download sources, and test files separatly.

Install jalamap

You must copy jalamap-0.5.jar somewere in your classpath, e.g. in WEB-INF/lib in case of a WebApp.

Obtain a Mappy API Key

You need an API key from mappy in order to use the services. Both free and commercial subscription are available. Details and subscription are available on Mappy's API web site api.mappy.com

Configure jalamap

Copy the the following text to a file named "jalamap.properties" at a root path accessible by classpath. (Typically your src root, or resources root).

                    #Production server
                    accessor-url=http://axe.mappy.com/1v1/

                    #Authentication parameters
                    #Replace the values between [] by your own value, register http://api.mappy.com/ to acquire an account (free or commercial).
                    default-login=[Your Mappy login]
                    default-password=[Your Mappy password]
                    default-user-ip-address=[The IP of the client used to access Mappy HTTP services]

                    debug=false
            

Replace the values as indicated

First call to the Geocoder

                        // Initialise the service and open a session on Mappy's server
                        GeocoderService geocoderService = new GeocoderService();

                        // Call the Mappy geocoder service
                        List<CertifiedLocation> certifiedLocations = geocoderService.geocode("21 avenue Guy de Maupassant, 13008 Marseille");

                        // Display the found coordinates
                        for
                        (CertifiedLocation certifiedLocation : certifiedLocations) {
                        System.out.println(certifiedLocation.getCoordinates());
                        }
                
Launch it, result should be :
                        5.395186,43.259154
                
Which are the longitude, latitude of the given adress.

More help

Some documentation are available in javadoc . The two main entry classes are :

  • org.jalamap.geocoding.GeocoderService
  • org.jalamap.route.RouteService

You can also read the AJAX and AS3 documentation on Mappy's API Web site api.mappy.com , which interface is oftenly similar to jalamap.

Support on bugs, library usage or enhancement requests is available via mail to author : samuelrobert (arobase) rosalog (dot) com.