WOW !! MUCH LOVE ! SO WORLD PEACE !
Fond bitcoin pour l'amélioration du site: 1memzGeKS7CB3ECNkzSn2qHwxU6NZoJ8o
  Dogecoin (tips/pourboires): DCLoo9Dd4qECqpMLurdgGnaoqbftj16Nvp


Home | Publier un mémoire | Une page au hasard

 > 

Conception et réalisation d?un site web dynamique pour la prise de rendez-vous médicale en ligne

( Télécharger le fichier original )
par Eskandar Kouicem + Azza Dridi + Med Nadir Boukelal
Université de Constantine 2 - Licence en informatique 2016
  

précédent sommaire suivant

Bitcoin is a swarm of cyber hornets serving the goddess of wisdom, feeding on the fire of truth, exponentially growing ever smarter, faster, and stronger behind a wall of encrypted energy

2.3 Code de l'api googlemap

<scriptsrc="https://maps.googleapis.com/maps/api/js?v=3.exp"></script>

<script>// Code de l'api googlemap qui récupère les coordonnés d'un point choisi

var x=36.2432373;

var y=6.5654465;

var center = new google.maps.LatLng(x,y);

var map;

function initialize() {

// Create the map.

varmapOptions = {

zoom: 15,

center: center,

mapTypeId: google.maps.MapTypeId.TERRAIN

};

map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

google.maps.event.addListener(map, 'click', function(event) {

z= event.latLng;

placeMarker(z);

});

}

google.maps.event.addDomListener(window, 'load', initialize);

google.maps.event.addListener(map, 'click', function(event) {

placeMarker(event.latLng);

});

var marker;

functionplaceMarker(location) {

if(marker){ //on vérifie si le marqueur existe

marker.setPosition(location); //on change sa position

}else{

marker = new google.maps.Marker({ //on créé le marqueur

position: location,

map: map

});

}

document.getElementById("latitude").value=location.lat();

document.getElementById("Longitude").value=location.lng();}

</script>

<script type="text/javascript">// Code de l'api googlemap qui récupère les coordonnés d'une ville choisie

vargeocoder;

function initialize() {

geocoder = new google.maps.Geocoder();

}

functioncodeAddress() {

var address = document.getElementById("address").value;

geocoder.geocode( { 'address': address},

function(results, status)

{

if (status == google.maps.GeocoderStatus.OK)

{

document.getElementById("Latitude").value=results[0].geometry.location.lat();

document.getElementById("Longitude").value=results[0].geometry.location.lng();

document.getElementById("Latitude1").value=results[0].geometry.location.lat();

document.getElementById("Longitude1").value=results[0].geometry.location.lng();

}}) ; }

</script>

<script>//Code de l'api googlemap qui récupère les coordonnés de la position actuelle

functiongetLocation() {

if (navigator.geolocation) {

navigator.geolocation.getCurrentPosition(showPosition);

} else {

x.innerHTML = "Geolocation non supporter sur ce navigateur.";

}}

functionshowPosition(position) {

document.getElementById("address").value = "";

document.getElementById("Latitude").value = position.coords.latitude;

document.getElementById("Longitude").value = position.coords.longitude;

document.getElementById("Latitude1").value = position.coords.latitude;

document.getElementById("Longitude1").value = position.coords.longitude;}

</script>

précédent sommaire suivant






Extinction Rebellion







Changeons ce systeme injuste, Soyez votre propre syndic



"Il faudrait pour le bonheur des états que les philosophes fussent roi ou que les rois fussent philosophes"   Platon