Web2py y Google Maps
Web2py y Google Maps
<script type="text/javascript">
function initMap() {
var myLatLng = {lat: 40.46366700000001, lng: -3.7492200000000366};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 5,
center: myLatLng
});
associa = db.associacions.with_alias("a")
poblacio = db.poblaciones.with_alias("p")
rows=
db(associa).select(associa.nom,poblacio.poblacion,poblacio.latitud,poblacio.longitu
d,left=[poblacio.on(poblacio.poblacion == associa.poblacio)])
i=1
for r in rows:
}}
{{
i+=1
pass
}}
var markerCluster = new MarkerClusterer(map, markers);
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=INSERTA_AQUI_TU_KEY">
</script>
</head>
<body>
<div style="height: 100%; width: 100%;" id="map"></div>
</body>
</html>