<% library.jmaki.insert( { component : "yahoo.geocoder", service : "xhp" } ); %> <script type:"text/javascript"> function geoCoderListener(coordinates) { var targetDiv = document.getElementById("geocoder001_message"); var reponseText = ""; for (var i in coordinates) { reponseText += "Latitude=" + coordinates[i].latitude + " Longitude=" + coordinates[i].longitude + "<br>"; } targetDiv.innerHTML = reponseText; } // subscribe to the topic '/yahoo/geocode' to which this widget publishes events jmaki.subscribe("/yahoo/geocoder", geoCoderListener); </script> <div id="geocoder001_message"></div>
You need to create an account or log in to post comments to this site.