[GIS] leaflet – The marker and center map are not in the right place

leafletmarkers

I'm starting use the Leaflet.
I put a marker to test but neither the marker nor the center are in the right local I set.
example: I put the marker inside a stadium and it appear outside stadium.

There are something I can do to correct this?

var mapquestUrl = 'this is not a link', mapquestAttribution = "Data CC-By-SA by http://openstreetmap.org/' target='_blank'>OpenStreetMap, Tiles Courtesy of http://open.mapquest.com' target='_blank'>MapQuest", mapquest = new L.TileLayer(mapquestUrl, {maxZoom: 18, attribution: mapquestAttribution, subdomains: ['1','2','3','4']});

map = new L.Map('map', { center: new L.LatLng(-8.842, 13.269), zoom: 15, layers: [nexrad], zoomControl: true });

L.marker([-8.815, 13.227], {icon: greenIcon}).addTo(map) .bindPopup('ooooo') .openPopup();

Best Answer

The problem was with the precision of your point (latitude and longitude).

The exact center of the stadium is "-8.8143, 13.226"

Look at my jsfiddle, I just remove some code to make it clear and focus on the solution: http://jsfiddle.net/sLwYG/1/

Hope it help you =)