<!DOCTYPE html>
<html>
<head>
<title>Leaflet Quick Start Guide Example</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="http://leafletjs.com/dist/leaflet.css" />
<script src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDY0kkJiTPVd2U7aTOAwhc9ySH6oHxOIYM&sensor=false"></script>
<script src="http://leafletjs.com/dist/leaflet.js"></script>
<script>
function getCoords(){
if ( navigator.geolocation ){
navigator.geolocation.getCurrentPosition(function(pos){
//document.write("" + pos.coords.latitude + "," + pos.coords.longitude);
});
}
}
var map = L.map('map').setView([36.9839019, 31.3300383], 7);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
var LeafIcon = L.Icon.extend({
options: {
shadowUrl: '../docs/images/leaf-shadow.png',
iconSize: [50, 59],
shadowSize: [50, 64],
iconAnchor: [22, 94],
shadowAnchor: [4, 62],
popupAnchor: [-3, -76]
}
});
var greenIcon = new LeafIcon({iconUrl: 'http://ideal.anemonajans.com.tr/tpl/images/mapPin.png'}),
redIcon = new LeafIcon({iconUrl: 'http://ideal.anemonajans.com.tr/tpl/images/mapPin.png'}),
orangeIcon = new LeafIcon({iconUrl: 'http://ideal.anemonajans.com.tr/tpl/images/mapPin.png'});
L.marker([36.9839019, 31.3300383], {icon: greenIcon}).bindPopup("Bayi 1").addTo(map);
L.marker([36.9839019, 34.3300383], {icon: redIcon}).bindPopup("Bayi 2.").addTo(map);
L.marker([36.9839019, 33.3300383], {icon: orangeIcon}).bindPopup("Bayi 3.").addTo(map);
</script>
</head>
<body onload="getCoords()">
<div id="map" style="width: 100%; height: 800px"></div>
</body >
</html>Burada yorumlanmış olan //document.write("" + pos.coords.latitude + "," + pos.coords.longitude); bu kod oldugunuz yerin kordinatlarını getirmekteve benim yapmam gerekende
var map = L.map('map').setView([36.9839019, 31.3300383], 7);[36.9839019, 31.3300383]burada bulunan kordinat alanına yazdırmak
yardımınızı bekliyorum çözersem illaki biçok kişinin işine yarayacaktır şimdiden tskler