Mapstraction is a JavaScript library that acts as an intermediate layer to use the maps of the most popular systems available today. The idea is to provide a wrapper, an interface, able to unify the code regardless, therefore, the type of rendering engine maps which you want to use.
The site provides demos and documentation . The library is downloadable for free. Supported in this release are the 9 most popular engines: OpenStreetMap, Yahoo , Google , Microsoft , Map24, MultiMap, MapQuest, FreeEarth and OpenLayers.
Supports the creation of Point, Line and Polygon. You can place your Image gallery overlay. Interesting support for geocoding of street addresses and directions to make! Net compatibility with feeds GeoRSS and KML .
From the examples of the code is easy to understand how useful a tool of this type. Each "interface" ( Google , Microsoft , Yahoo , etc ...) it has its own set of APIs. Through Mapstraction , however, we can write a single block of code and let the end user the choice of provider to use. For example, when you initialize the library, the following line of code:
1 2 | / / Initialise the map with your choice of API new Mapstraction ( 'mapstraction' , 'google' ) ; var = new mapstraction Mapstraction ('mapstraction', 'google'); |
Determines engine Google ! If it comes from, sostituiendo the string 'google', immediately change the rendering engine of maps!
1 2 | / / Initialise the map with your choice of API new Mapstraction ( 'mapstraction' , 'microsoft' ) ; var = new mapstraction Mapstraction ('mapstraction', 'microsoft'); |
Although the library is not really complete, can be integrated into a single framework all the features "spread" of the individual libraries. The rendering engine Microsoft, for example, allows display "as the crow flies." OpenStreetMap and Google have excellent management of street maps, including the Italian ones. So, for those who must face the development of an application with the use of maps and can not - just - to decide which technology to use for development, Mapstraction allows - in fact - to cut oneself, to resolve the dilemma by introducing, in fact, a third actor, and in this way, provide the ability to change rendering engine at any time. So nice idea to follow and use!







Latest Comments
Rosanna : Can anyone tell me how do I delete the Snap Shots window that opens automatically when I ...
blessed Maresca : I can not download any skypemote me spiegaaa
Matthew : Hello everyone, unfortunately Google does not allow the use of the API for Flash, but it will ...
Giovambattista Fazioli : @ GM: If you upload images to a different server (that WordPress can not ...
GM : Hi, sorry to resurrect an old post but I hope you can give me a hand. How do I, with this method, ...