Google Maps API Uncaught TypeError: Cannot read property '__e3ae_' of undefinedT.trigger -
<!doctype html > <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>langganan</title> <script type="text/javascript" src="jquerry.js"></script> <script type="text/javascript" src="markercluster.js"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js"></script> <script type="text/javascript"> //<![cdata[ 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' } }; var cluster = []; function load(lt,lg,zoom) { var map = new google.maps.map(document.getelementbyid("map"), { center: new google.maps.latlng(lt, lg), zoom: zoom, maptypeid: 'roadmap' }); var infowindow = new google.maps.infowindow(); downloadurl("phpsqlajax_genxml3.php ", function(data) { var xml = data.responsexml; var markers = xml.documentelement.getelementsbytagname("marker"); (var = 0; < markers.length; i++) { var name = markers[i].getattribute("nama"); var address = markers[i].getattribute("alamat"); var type = markers[i].getattribute("wilayah"); 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, shadow: icon.shadow }); cluster.push(marker); google.maps.event.addlistener(marker, 'click', (function(marker, i) { return function() { map.setzoom(17); map.setcenter(marker.getposition()); infowindow.setcontent("kode pelanggan : "+markers[i].getattribute("kode_pelanggan")+"<br/>"+ "nama pelanggan : "+markers[i].getattribute("nama")+"<br/>"+ "alamat pelanggan : "+markers[i].getattribute("alamat")+"<br/>"+ "wilayah : "+markers[i].getattribute("wilayah")); infowindow.open(map, marker); } })(marker, i)); } var a=15; var mc = new markerclusterer(map, cluster,{ maxzoom: /*, // gridsize: size, // styles: styles[style] // */ } ); }); } 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, request.status); } }; request.open('get', url, true); request.send(null); } // google.maps.event.trigger(marker,'click'); function info(x) { google.maps.event.trigger(cluster[x],'click'); } function replaceall(find, replace, str) { return str.replace(new regexp(find, 'g'), replace); } function get(){ var tempout; $.post('tampil.php',{ ambil: frm.ambil.value}, function(output){ var tampung = output.replace("[", ""); tampung = tampung.replace("]", ""); tampung = replaceall('"',"",tampung); var kode = tampung.split(","); var latx = kode[3]; var lngx = kode[4]; load(latx,lngx,17); info(kode[0]); $('#nama').html(output).show(); } ); } function donothing() {} //]]> </script> <script type="text/javascript"> </script> </head> <body onload=load(-5.162764,119.443118,13)> <form name="frm"> <center><input type="text" id="ambil" name="ambil" value=""> <input type="button" id="cari"value="cari" onclick="get(); "/></br> <div id="nama"></div></center> <a href="#" onclick="info(6);">open info window</a> </form> <div id="map" style="width: 600px; height: 400px" ></div></hr> </body> </html>
i'm use new system gis website , i'm getting following error: uncaught typeerror: cannot read property '__e3ae_' of undefinedt.trigger @ main.js:18info @ map.php:112(anonymous function) @ map.php:134jquery.callbacks.fire @ jquerry.js:3143jquery.callbacks.self.firewith @ jquerry.js:3255done @ jquerry.js:9309jquery.ajaxtransport.send.callback @ jquerry.js:9713
Comments
Post a Comment