Mapstraction: JavaScript library for handling maps

Mapstraction

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 that can unify the code whatever, then the type of rendering engine maps that you want to use.

Mapstraction Are available on site demos and documentation . The library is downloadable for free. Supported in this release are the most famous engines 9: OpenStreetMap, Yahoo , Google , Microsoft , Map24, MultiMap, MapQuest, FreeEarth and OpenLayers.

Supports the creation of Point, Line and Polygon. You can insert your Image gallery overlay. Interesting support for geocoding of street addresses and directions of the brand! Net compatibility with feeds GeoRSS and KML .

From the examples of the code once you 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 the engine Google ! It is without saying that, I replaced the string 'google', immediately change the rendering engine of the 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 maps have excellent management of the road, including the Italian ones. In short, 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, third actor, and in this way, give us the ability to change the rendering engine at any time. So good idea to follow and to use!

There are no comments for this post

Leave a comment

XHTML TAG PERMIT: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> INSERTION CODE:
 <pre></pre> // blocco generico <code></code> // blocco generico [cc_actionscript][/cc_actionscript] // Actionscript [cc_actionscript3][/cc_actionscript3] // Actionscript 3 [cc_css][/cc_css] // CSS Style Sheet [cc_html][/cc_html] // HTML [cc_js][/cc_js] // Javascript [cc_objc][/cc_objc] // Objective-C [cc_php][/cc_objc] // PHP [cc_sql][/cc_sql] // SQL 


Stop SOPA