maptp-service

FINALLY, A RUBY CLIENT FOR MAP TP!

Repository: github.com/ffwdme/maptp-service

Gem: rubygems.org/gems/maptp-service

Bug Tracker: github.com/ffwdme/maptp-service/issues

DESCRIPTION:

This gem provides access to the MapTP web services.

In order to use them, you need your MapTP credentials aka your Map24 id.

For more information head over to www.nn4d.com

You should consider that this client solely works with WGS´84 coordinates in the Decimal Degrees format. Usually MapTP services work with the Decimal Minutes format, but because Decimal Degrees are much more established we use it for this lib. To work with MapTP the parameters as well as the responses are converted internally.

Note: This is not an official client of MapTP or NAVTEQ, but a private project. :)

FEATURES/PROBLEMS:

  • A very simple routing request (takes not much options).

  • Free search for geocoding.

  • more to come…

SYNOPSIS:

Setup

First of all you need to provide your MapTP credentials. For example if your Map24 id is “123ABC” and bound to the server maptp12.map24.com you’ll enter

MapTP.set_credentials '123ABC', 'maptp12'

Geocoding (free search)

Create a new geocoding object

geocoding = MapTP::Geocoding.new

Try to find addresses/points/objects matching a search term, e.g. “Times Square, New York”, “Zeil Frankfurt”, “Downing Street 10 London”

results = geocoding.find_coordinates_by_text("Downing Street 10 London")

This will return either a hash containing the objects found or in case something went wrong a hash with a key “:ERROR” that holds the error informations.

Routing

Given, you have two coordinates to create a route for:

start_coordinate = { :lat => 49.945589, :lng => 8.845563 }
destination_coordinate = { :lat => 49.936982, :lng => 8.911113 }

Just create a new routing object:

routing = MapTP::Routing.new

And try to find the matching route:

route = routing.find_route_by_coordinates start_coordinate, destination_coordinate

This will return either a hash containing the route informations or in case something went wrong a hash with a key “:ERROR” that holds the error informations.

REQUIREMENTS:

INSTALL:

sudo gem install maptp-service

TESTING:

In order to run the tests properly, make sure you provided your MapTP credentials as shown above.

IMPORTANT NOTE

Again, this is not an official client of MapTP or NAVTEQ but a private project.

If you’re looking for the official clients/APIs head over to www.nn4d.com

LICENSE:

(The MIT License)

Copyright © 2010 Christian Bäuerlein

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.