Hello All,
I need to load an XML file from a website.
I'm using
*GDownloadUrl("sonHafta.xml", function(data) code and it works correctly.*
*but whem i'm trying to use*
*
*
*GDownloadUrl("http://www.koeri.boun.edu.tr/sismo/zeqmap/xmlt/sonHafta.xml"*
*
*
*nothing happens.*
*I'm very new at Google Maps developing*
*
*
*All Of Codes,*
*
*
* * <script type="text/javascript">
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addMapType(G_PHYSICAL_MAP);
map.addMapType(G_SATELLITE_3D_MAP);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(39.614495, 30.341861), 5);
map.enableGoogleBar();
GDownloadUrl("
http://www.koeri.boun.edu.tr/sismo/zeqmap/xmlt/sonHafta.xml",
function(data) {
var xml = GXml.parse(data);
var markers =
xml.documentElement.getElementsByTagName("earhquake");
for (var i = 0; i < markers.length; i++) {
var latlng = new
GLatLng(parseFloat(markers[i].getAttribute("lat")),
parseFloat(markers[i].getAttribute("lng")));
map.addOverlay(new GMarker(latlng));
}
});
}
}
</script>
Am I need some extra codes to load XML from another website?
I'm working at localhost right now.
Best Regards
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" group.
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-api?hl=en.