473,396 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PHP and Google MAP API how can i integrate?

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));
}
Aug 28 '06 #1
1 3705

mich dobelman wrote:
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));
}

You might find this helpfull

http://mapki.com/wiki/AJAX_with_PHP_and_MySQL

Shawn

Aug 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Rob R. Ainscough | last post by:
I'm looking for some Knowledge base tools that would integrate into VS.2003 and be flexible. My developers would us it to house important tips, tricks, and other information -- needs to have...
3
by: Tom Kaz | last post by:
I need to compute integral of some array function, something like: from scipy import * f = lambda x: array( ) integrate.quad(f, 0, 1) Unfortunately integrate.quad requires Float type.
5
by: Marcelo | last post by:
How can I integrate c++ programs inside a GUI java interface? I would like to get the results from a c++ program and integrate them inside a java GUI. thanks Marcelo
1
by: Johnny Meredith | last post by:
Dear All, I have an Access database that tracks the progress of income tax audits. When the taxing authorities make a change (an "Adjustment"), I record the pertinent information in the...
0
by: P McGinness | last post by:
Basically, I've a JS function called ValidateForm(), which returns true or false and controls if the form submits. When I integrate this with .NET validators, the .NET always adds it's own call...
1
by: PRR | last post by:
i have NO idea on this... except that google maps uses heavily javascripts... i wanna know where to start if i intent to integrate google maps with website... so that i can show some locations.....
1
by: ITistic | last post by:
I am in the planning stages of a new web application. One of the requirements for this application is to provide a Google Calendar type interface to show important events which will be pulled from...
1
by: DaNieL | last post by:
Hi there! I'm in needing to use GCaledar in one web-application that i've created: 1. Users should set many calendars as they would; 2. The calendars are shown in the pages by the iframe (the...
1
by: chjpdas75 | last post by:
Hi, please tell me how to make payment from the asp.net2.0 application using google check out payment gateway? Thanking you.
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.