About the new code: here is:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Maps AJAX + mySQL/PHP Example</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <script type="text/javascript"> var customIcons = { restaurant: { icon: 'http://labs.google.com/ridefinder/images/mm_20_blue.png', //shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png ' }, bar: { icon: 'http://labs.google.com/ridefinder/images/mm_20_red.png', // shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png ' } }; function load() { // Change this depending on the name of your PHP file downloadUrl("phpsqlajax_genxml.php", function(data) { var xml = parseXml(data); var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = "<b>" + name + "</b> <br/>" + address; var icon = customIcons[type] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon, }); bindInfoWindow(marker, map, infoWindow, html); } }); setTimeout(function(){ load()},2000); } function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); }); } function downloadUrl(url, callback) { var request = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest; request.onreadystatechange = function() { if (request.readyState == 4) { request.onreadystatechange = doNothing; callback(request.responseText, request.status); } }; request.open('GET', url, true); request.send(null); } function parseXml(str) { if (window.ActiveXObject) { var doc = new ActiveXObject('Microsoft.XMLDOM'); doc.loadXML(str); return doc; } else if (window.DOMParser) { return (new DOMParser).parseFromString(str, 'text/xml'); } } function doNothing() {} </script> </head> <body > <div id="map" style="width: 500px; height: 300px"> <script type="text/javascript"> var map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(47.6145, -122.3418), zoom: 13, mapTypeId: 'roadmap' </script> </div> </body> </html> take a look, setTimeout(function(){ load()},2000); By time, it's a local code yet. jose carlos 2010/1/31 Jose Carlos Villajulca Velasquez <[email protected]> > Well, in the future idea will be publish tha application in a web server to > people can see in the internet localitation of yours vehicles. > > > 2010/1/31 Jose Carlos Villajulca Velasquez <[email protected]> > >> mmmm, i see.... i'm going to take a look how to control google earth. >> >> thanks >> >> >> 2010/1/31 Jose Carlos Villajulca Velasquez <[email protected]> >> >>> mmm i've change the way to communicate the xml file with java script, >>> i've follow this tutorial: >>> >>> http://code.google.com/apis/maps/articles/phpsqlajax_v3.html >>> >>> <http://code.google.com/apis/maps/articles/phpsqlajax_v3.html>Its work >>> properly, idea is change values from Database and it show into the map, but >>> if add >>> >>> setTimeout(function(){ refreshMap(map)},6000); >>> >>> But, i see that memory ram in my computer is constantly increasing of >>> value. >>> >>> what i can do? >>> >>> >>> >>> Its work properly, idea is change values from Database and it show into >>> the map, but if add >>> >>> 2010/1/31 Jose Carlos Villajulca Velasquez <[email protected]> >>> >>>> mmm, so... what i can do, i dont have idea how i solve this. >>>> >>>> >>>> 2010/1/31 [email protected] <[email protected]> >>>> >>>>> On Jan 31, 3:53 pm, Andrew Leach <[email protected]> >>>>> >>>>> wrote: >>>>> > On Jan 31, 11:43 pm, "[email protected]" <[email protected]> >>>>> > wrote: >>>>> > >>>>> > >>>>> > >>>>> > > Unless you have a premier key, that sounds like a violation of the >>>>> > > Terms of Use (at least for V2 maps, I am not that familiar with the >>>>> > > TOU for V3). >>>>> > >>>>> > For information: the Terms for Version 3 are the same as Version 2. >>>>> > Links from both sets of docs point tohttp:// >>>>> code.google.com/apis/maps/terms.html >>>>> >>>>> I just went an looked and discovered that for myself. The only >>>>> difference being that V3 doesn't require a key. >>>>> >>>>> -- Larry >>>>> >>>>> > >>>>> > Andrew >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "Google Maps API" group. >>>>> To post to this group, send email to [email protected]. >>>>> To unsubscribe from this group, send email to >>>>> [email protected]<google-maps-api%[email protected]> >>>>> . >>>>> For more options, visit this group at >>>>> http://groups.google.com/group/google-maps-api?hl=en. >>>>> >>>>> >>>> >>>> >>>> -- >>>> José Carlos Villajulca Velásquez >>>> >>>> Vice-Presidente Comision Organizadora INTERCON 2008 >>>> Universidad Privada Antenor Orrego* Trujillo - Perú >>>> IEEE Section Peru-Comité de Actividades Estudiantiles >>>> IEEE Student Branch UPAO >>>> PAST-PRESIDENT 2006 >>>> Fono +51 044 221052 >>>> Cel: +51 44 949114901 >>>> IEEE: Institute of Electrical and Electronics Engineers >>>> >>> >>> >>> >>> -- >>> José Carlos Villajulca Velásquez >>> >>> Vice-Presidente Comision Organizadora INTERCON 2008 >>> Universidad Privada Antenor Orrego* Trujillo - Perú >>> IEEE Section Peru-Comité de Actividades Estudiantiles >>> IEEE Student Branch UPAO >>> PAST-PRESIDENT 2006 >>> Fono +51 044 221052 >>> Cel: +51 44 949114901 >>> IEEE: Institute of Electrical and Electronics Engineers >>> >> >> >> >> -- >> José Carlos Villajulca Velásquez >> >> Vice-Presidente Comision Organizadora INTERCON 2008 >> Universidad Privada Antenor Orrego* Trujillo - Perú >> IEEE Section Peru-Comité de Actividades Estudiantiles >> IEEE Student Branch UPAO >> PAST-PRESIDENT 2006 >> Fono +51 044 221052 >> Cel: +51 44 949114901 >> IEEE: Institute of Electrical and Electronics Engineers >> > > > > -- > José Carlos Villajulca Velásquez > > Vice-Presidente Comision Organizadora INTERCON 2008 > Universidad Privada Antenor Orrego* Trujillo - Perú > IEEE Section Peru-Comité de Actividades Estudiantiles > IEEE Student Branch UPAO > PAST-PRESIDENT 2006 > Fono +51 044 221052 > Cel: +51 44 949114901 > IEEE: Institute of Electrical and Electronics Engineers > -- José Carlos Villajulca Velásquez Vice-Presidente Comision Organizadora INTERCON 2008 Universidad Privada Antenor Orrego* Trujillo - Perú IEEE Section Peru-Comité de Actividades Estudiantiles IEEE Student Branch UPAO PAST-PRESIDENT 2006 Fono +51 044 221052 Cel: +51 44 949114901 IEEE: Institute of Electrical and Electronics Engineers -- You received this message because you are subscribed to the Google Groups "Google Maps API" 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.
