Witam,
posiadam gotowe rozwiązanie, które zainstalowałam na joomli 2.5.
Jednak posiada wiele błędów w plikach PHP i nie działa prawidłowo.
Jestem początkująca dlatego potrzebuje pomocy (w API Google Map).
Problem w tym, że mapa zaciąga złą ilość punktów.
Załączam plik PHP. wIERSZ 77 na pewno m.in. wpływa na ilość markerów na mapie.
Niestety więcej nie potrafie wymyśleć/poprawić

<?php
JHTML::_('behavior.calendar');
jimport( 'joomla.utilities.date' );
$doc =& JFactory::getDocument();
$uri =& JFactory::getURI();
$url= $uri->root();
$image_dir=$url."components/com_hbooking/assets/images/";
?>
<script src="http://maps.google.com/maps?file=api&v=1&sensor=true&key=
<?php echo $google_api->map_api ;?>" type="text/javascript"></script>
<script type="text/javascript">
var WINDOW_HTML_MAP='';
var map = null;
var image_path =null;
var infowindow = null;
var geocoder = null;
var k=0;
function initialize(){
if (GBrowserIsCompatible()) {
var mapOptions = {
googleBarOptions : {
style : "new"
}
}
map = new GMap2(document.getElementById("map_module_canvas"));
map.setCenter(new GLatLng(52.4193, 19.5816), 6);
// map.addOverlay(new GLatLng(37.4419, -122.1419);
map.setUIToDefault();
// map.enableGoogleBar();
geocoder = new GClientGeocoder();
}
}
function showmapAddress(address,detail) {
//WINDOW_HTML_MAP = detail;
//alert(detail);
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (point)
{ var marker = new GMarker(point);
map.setCenter(point, 6);
map.addOverlay(marker);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(detail);
});
}
}
);
}
}
//initialize();
window.onload=function(){
initialize();
<?php
[b
]for($i=6; $i < count ($hotel_list); $i++ )[/b
] {
$location =$hotel_list[$i]->address1;
$add3 = $hotel_list[$i]->city_id;
$country = $hotel_list[$i]->country_name;
$address = "";
$linkadd = "";
$address = $location;
$linkadd = $location;
if($add1!="")
{
$address .= ', '.$add1;
$linkadd .= ', '.$add1;
}
if($add3!="")
{
$address .= ', '.$add3;
$linkadd .= ', '.$add3;
}
if($country!="")
{
$address .= ', '.$country;
$linkadd .= ', '.$country;
}
//$address .= ','.$zipcode;
//$linkadd .= ','.$zipcode;
$address .= ', '.$country;
$linkadd .= ', '.$country;
$image_dir=$url."components/com_hbooking/assets/images/";
$pp1 = '<div style="width: 210px;padding-right:10px"><table><tr><td width="60px">'.$linkadd.'</td></tr></table></div>';
?>
image_path = "<?php //echo $this->doclist[$i]->iconpath;?>";
showmapAddress("<?php echo $address?>",'<?php echo $pp1;?>');
<?php } ?>
}
window.onunload=function(){
GUnload();
}
</script>
<div id="map_module_canvas" style="width:
<?php echo $google_api->map_width;?>px; height:
<?php echo $google_api->map_height;?>px;border:1px solid #888888;"></div>
</form>
Nie wiem czy jeszcze potrzebujecie więcej informacji.
strona: www.tripin.pl
Pozdrawiam
Czy jest w stanie ktoś mi pomóc bo straciłam cierpliwość
Ten post edytował Hedik 25.08.2013, 14:39:15