Reply to PHP and Google MAP API how can i integrate?

Your name:

Reply:


Posted by mich dobelman on 08/28/06 06:58

What's the common way to integrate php and google map api?

I tried to create the getShop.php script which access the db and fetch
the list of shops with lat and lon information in xml document. But without
access? I thought this is not the common way to call the php script from
javascript?

any advice appreciated.


var dom = new ActiveXObject("Msxml2.DOMDocument");
dom.async = false;
alert( "before call");
dom.load("getShops.php?x1=" + bounds.minX + "&y1=" + bounds.minY + "&x2="
+ bounds.maxX + "&y2=" + bounds.maxY);
alert( dom.xml );
alert( "after call");
var xml = GXml.parse(dom.xml);
var markers = xml.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {


var point = new GLatLng(
parseFloat(markers[i].getAttribute("lat")),
parseFloat(markers[i].getAttribute("lng"))
);

map.addOverlay(new GMarker(point));
}

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация