This particular query is related to a previously asked question about Passing XML data to JavaScript in order to display markers on a Google Map. The original question was posed by via8321 and answered by aSeptik on Mar 25 '14.
You can find the initial discussion here: [Passing XML to Javascript to show markers in Google map
The code used is based on the solution provided in the above reference (you can view a demo example here: [)
In an effort to create a search radius module where users can select a radius, locations are fetched from a MySQL database and displayed as a map with markers. Similar to the issue faced by via8321, even though the XML output (XML doc) was correct, there were difficulties rendering it into a map with markers.
You can refer to the documented problem and discussion here: [
By implementing the solution suggested by aSeptik, the module started functioning correctly on its own. As per the insights from via8321 and aSeptik's comments, the critical change involved shifting from POST or GET to REQUEST while fetching form variables to pass to the MySQL query. Additionally, adjustments were made to the backend PHP file, moving away from node creation and saving XML functions towards utilizing xml_entities and .implode methods. Another modification included transitioning from a select list input to a simple text field, facilitating the transmission of a radius value for the SQL query.
Currently, efforts are being directed towards integrating this functionality into a larger application that utilizes a different MySQL database. However, a recurring challenge has resurfaced - only able to generate XML output without successfully displaying the map and associated markers. This issue appears to mirror the prior encounter.
If you have any insights into what might be causing this specific problem or if you can offer assistance in resolving it, your help would be greatly appreciated. Thank you. (Refer to the provided code snippet below.)
Below is the snippet of mapsearch.php containing the frontend form and map:
<?php
session_start();
include_once("includes/config.php");
$s_pid = $_SESSION['pid'];
$sqlCommand = "SELECT * from kusers_tbl WHERE PID = '$s_pid'";
$result = mysql_query($sqlCommand);
$row = mysql_fetch_row($result);
$center_lat = $row[14];
$center_lng = $row[15];
$_SESSION['user_lat'] = $row[14];
$_SESSION['user_lng'] = $row[15];
?>
<!DOCTYPE html>
...
For further details on the backend logic implemented in the mapsearchdb.php file and the XML output structure, please see the next snippet and sample section showcasing the XML output format.