Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
<?php
//de code van google => http://www.google.com/apis/maps/signup.html
$code = '';
//!empty($_GET['adres']) ? htmlentities($_GET['adres']) : $eigenadres;
$hetaddress = isset($_GET['adres'])? htmlentities($_GET['adres']) : 'gent';
$soort = 'G_HYBRID_MAP';//kaart 'G_NORMAL_MAP' sateliet 'G_SATELLITE_MAP' bijde 'G_HYBRID_MAP'
//Hoever wil je inzoomen? 1 is Mondiaal niveau, 100 is verst ingezoomd. (google standaard waarde: 15)
$zoom = 18;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps check adres</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=<?=$code ?>" type="text/javascript"></script>
<script type="text/javascript">
var _myWidth;
var _myHeight;
var map = null;
var geocoder = null;
var mgr = null;
/*
*@param Items[i][0]
**/
function init(Items){
for(var i=0;(i<Items.length&&typeof(Items[i])!="undefined");i++){
Items[i][0];
}
}
function load(adres){ //de hoofdfunctie
if (GBrowserIsCompatible()){
map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
mwh();
geocoder = new GClientGeocoder();
showAddress(adres + " BE");
showAddress("Boekhoute" + " BE");
showAddress("assenede" + " BE");
}
}
function showAddress(address){
if (geocoder){
geocoder.getLatLng(address,
function(point){//als het adres niet gevonden is
if (point){
map.setCenter(point, <?=$zoom; ?>, <?=$soort;?>);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml(address);
}
}
);
}
}
function zoom(oEvent, s){// ----- mousewheel
if(s == -120){map.zoomOut();}
if(s == 120){map.zoomIn();}
}
function mwh(){
var d = document.getElementById('map')
if (d){
try {
if (document.body.addEventListener){
d.addEventListener('DOMMouseScroll', function(oEvent) {zoom(oEvent, oEvent.detail * -40); }, false);
}else{
d.onmousewheel = function() { zoom(event, event.wheelDelta); return false; }
}
}catch (ex) {
}
}
}
</script>
</head>
<body onload="load('<?= $hetaddress ?>')" onunload="GUnload()">
<div id="map" style="width: 100%; height: 400px">
</div>
<form action="?" method="get">
<label>Je adres (binnen nederland): </label>
<input name="adres" type="text" value="<?php echo $hetaddress?>" />
<input type="submit" value="Go!" />
</form>
</body>
</html>
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.