5

Is there any available javascript adapter/wrapper library which can be used instead of programming directly to a specific API such as Google's API ?

I am just about to learn how to use web mapping services, and now want to figure out which mapping service I want use for a new website under development.

Though, I would like to make it easy to switch into some other mapping service without rewriting lots of code, and would prefer to simply reconfigure which mapping service to use, so I can just keep on programming to a generic adapter API instead of rewriting code when for example switching from using Google Maps to Yahoo Maps.

For example, in the tutorial at: http://code.google.com/apis/maps/documentation/javascript/tutorial.html there are some Google specific types such as 'google.maps.LatLng' , 'google.maps.Map' , 'google.maps.MapTypeId' and I guess that Bing and Yahoo API's have their corresponding types for doing a similar things.

So, the main question is if there is any generic adapter/wrapper API library that provides a general abstraction API with different implementations targeting specific mapping API's ?

user743436
  • 324
  • 2
  • 14

1 Answers1

3

There is one such api called Mapstraction. It allows one to develop for bing/Google/Yahoo with the same set of instructions. The disadvantage is that these map providers are not equal feature wise, and so there might be a gap between Mapstraction api and the native ones. But for simple things you shouldn't have a problem.

psousa
  • 6,676
  • 1
  • 32
  • 44