You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.
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
Original issue reported on code.google.com by [email protected] on 23 Nov 2011 at 10:36
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
[email protected]
on 23 Nov 2011 at 10:36The text was updated successfully, but these errors were encountered: