Sedang Disiapkan

Google Map query window tweaks

This is a project similar to one which had many responses.

I have a MySQL table that writes to an XML file, which then outputs markers to a google map. When you click on a marker, it contains certain field outputs from the table (simple example based on google bar/restaurant type tutorial).

The MySQL database (which table writes to the XML file) executes PHP based web pages to produce various search and record-detail output pages which also contains the longitude and latitude points which plot the markers.

This project entails completing the following, based on what has been accomplished already.

1) The info window should have a link corresponding to the query output detail PHP page (url) for that record.

2) The info window font style and size should match the corresponding query detail page.

3) The XML code and google code on htm pages should be optimized to keep the scripting and outputs as efficient as possible.

For more detail, see below:

I have created a MySQL database which outputs PHP pages for a client's sites. I created PHP search and record detail web pages using DBQwiksite. There are three test locations with correct latitude and longitude coordinates in corresponding fields. Using the documentation at Google I have managed to have the MySQL table write to XML to plot marker points on the googlemap and the info window displays assigned variables from the database fields:

(relevant part of code which does this)

GDownloadUrl("genxml3.php", function(data) {

var xml = [url removed, login to view](data);

var APS = [url removed, login to view]("marker");

for (var i = 0; i < [url removed, login to view]; i++) {

var Board_ID = APS[i].getAttribute("Board_ID");

var Street_Address = APS[i].getAttribute("Street_Address");

var City = APS[i].getAttribute("City");

var point = new GLatLng(parseFloat(APS[i].getAttribute("Latitude")),

parseFloat(APS[i].getAttribute("Longitude")));

var marker = createMarker(point, Board_ID, Street_Address, City);

[url removed, login to view](marker);

}

});

}

}

function createMarker(point, Board_ID, Street_Address, City) {

var marker = new GMarker(point, customIcons[Board_ID]);

var html = "<b>" + Board_ID + "</b> <br/>" + Street_Address + "<br/>" + City;

[url removed, login to view](marker, 'click', function() {

[url removed, login to view](html);

});

return marker;

}

//]]>

</script>

</head>

<body onload="load()" onunload="GUnload()">

<div id="map" style="width: 772px; height: 584px"></div>

</body>

</html>

The map that renders this is here: [url removed, login to view]

(this map is centered on one of the test markers in Tallahassee, Florida)

The PHP page that relates to the marker on this map is here: [url removed, login to view]

You will notice that the field output for "Board_ID", "Street_Address" and "City" are the same as in the info window from the [url removed, login to view] marker in Tallahassee--this shows that the info window text is derived from the database table.

What I am trying to do is to make the Board_ID display in the info window hyperlink to the PHP page:

[url removed, login to view]

The primary key on this database is simply called "Key" and the number "4" is the unique Key identifier for this record. I realize that I will need to introduce the "Key" variable in the XML file and the code above but what has me stumped is the co-mingling of html hyperlink tags with google code to link to the corresponding PHP page.

There may be a better approach...

Kemahiran: AJAX, PHP, XML

Lihat lebih lanjut: google maps query, google maps queries, google map query, php google map window, tutorial search, search tutorial, query tutorial, php code google search, number tutorial, n query, height length, google sites script, div search, map tutorial, aps net, googlemap url query, php google map query, google map query window, google maps hyperlink xml, twitter query google map, google query jobs, gdownloadurl infowindow, php googlemaps infowindow, googlemaps query, infowindow gdownloadurl

Tentang Majikan:
( 0 ulasan ) Tallahassee, United States

ID Projek: #382939