This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Could some one recommend a API

0

Could some one recommend a OpenLayers or Leaflet API for me.... I am looking to input my own latitude and longitude coordinates and have a icon move to that location. Possibly with a hover over option to show a info bubble.

Also looking for a API that will allow me to mouse click on the MAP and have it output the latitude and longitude coordinates.

Thank you for your time.

asked 17 Jan '13, 14:49

Orbitaltwist's gravatar image

Orbitaltwist
30335
accept rate: 0%


2 Answers:

3

It sounds like it's not really an API you're looking for - it's some example code!

If you haven't got anything working yet, I'd start with this worked example on the switch2.osm site. Features such as "move to a location" are covered in the Leaflet documentation (and there are lots of examples), so I'd have a look at the main Leaflet site too.

A web search for "cloudmade leaflet examples" turns up lots of sites too.

answered 17 Jan '13, 15:06

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

2

IMO Leaflet is much easier to get started with. The examples in their documentation work well. They show Cloudmade tiles, but you could use tiles from OSM, MapQuest Open and many other sources. The biggest obstacle to many people is getting to grips with JavaScript - indeed many of the questions on the Leaflet Google group are really just JavaScript questions. I recommend using the Firebug debugging tool in Firefox to help with getting started.

answered 17 Jan '13, 20:51

ChrisH's gravatar image

ChrisH
4.1k134262
accept rate: 15%

Source code available on GitHub .