Con questo codice io mostro l'hotel selezionato:
ora vorrei fare in modo che insieme a questo hotel che ha un marker suo, si vedessero anche gli altri hotel nei pressi.codice:<script type="text/javascript"> var map = null; var geocoder = null; var icon = icon; function load() { if (GBrowserIsCompatible()) { map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(40.727486,13.907318), 13); icon = new GIcon(); icon.image = "fig/marker.png"; icon.iconSize = new GSize(23, 34); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); geocoder = new GClientGeocoder(); } } function showAddress(address) { if (geocoder) { geocoder.getLatLng( address, function(point) { if (!point) { alert(address + " not found"); } else { map.setCenter(point, 13); var marker = new GMarker(point, icon); map.addOverlay(marker); marker.openInfoWindowHtml('<span class=azzurrobold><?php print "$hotel"; ?></span> <span class=grassetto>CHIAMA E PRENOTA SUBITO:</span> <span class="blu_big"> 081 196 81 396</span> <span class=arancio>-stelle-ischia/<?php print "$directory"; ?>.html" title="vedi <?php print "$hotel"; ?> di Napoli" target="_blank">VEDI L\'HOTEL</span>'); } } ); } } </script>
Una cosa tipo booking.com
Sapete dirmi cosa devo aggiungere?
ps. nella query al database indico where hotel = $hotel proprio per farmi vedere questo hotel!

Rispondi quotando