Hi,

I'm learning Google Maps and WordPress plugins. I've built a basic Google 
Maps shortcode plugin. But, I'm having problems placing markers on the map. 
The map is visible and I've pulled the lat long coordinates from a MySQL 
database. I'm following the 
tutorial<http://code.google.com/apis/maps/articles/phpsqlajax_v3.html>here. 

I'm not sure how to output XML from a WordPress plugin. This a snippet from 
my plugin:

$dom = new DOMDocument('1.0');
$node = $dom->createElement('markers');
$parnode = $dom->appendChild($node);

    $csf_data = $wpdb->get_results($wpdb->prepare("SELECT  * "));             

        foreach($csf_data as $incident) {
            $node = $dom->createElement('marker');
            $newnode =  $parnode->appendChild($node);
            $newnode->setAttribute("lat", $incident->latitude);
            $newnode->setAttribute("lng", $incident->longitude);
        }

        die();

        echo $dom->saveXML;


In the tutorial, the php script is in a separate file and when it runs, it 
outputs XML. In my case, the code above is in the main plugin file. Also, in 
the tutorial this: function downloadUrl(url, callback) is used to load the 
XML file. How do I output the XML to a separate file in WordPress, so that I 
can use this function?

How do I tell if XML has been output by WordPress?
How do I export the XML to a separate file in WordPress?
How do I load the XML file in WordPress?

Any suggestions? Thank you.

-Laxmidi


-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-maps-js-api-v3/-/D_WAPVHl80EJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to