Note that there are some explanatory texts on larger screens.

plurals
  1. POGeocoding Service returns uncaught type error: #<Object> object has no method 'apply'
    primarykey
    data
    text
    <p>I'm trying to get lat long coordinates from an address using the Google maps api v3 in Wakanda Studio. I have submitted to the Wakanda forum as well. I searched the v3 documentation as well, which basically advises to pass a JSON object and a call back function to geocode, which is displayed in the code below.</p> <p>The geocode call is also encapsulated in the codeAddress function. When I run the code, I can see the Geocoder JSON object results that include the lat long coordinates. However, I am getting a strange error message: </p> <pre><code>Uncaught Error Type: Object #&lt;Object&gt; has no method 'apply' </code></pre> <p>Any pointers would be appreciated, and let me know if you need to see screenshots/details of anything else emailed, since I cannot post screenshots on stack overflow yet.</p> <pre class="lang-js prettyprint-override"><code>button1.click = function button1_click (event) { $$('map').setCenter("London, England"); var address1 = "911 South Park Street, Kalamazoo, MI, 49001"; geocoder = new google.maps.Geocoder(); if(!geocoder) { alert("no geocoder available"); } else { alert("geocoder available"); } codeAddress(address1); }; function codeAddress(address) { var address1 = address; geocoder.geocode( {'address': address1}, {onSuccess: function(results, status) { if (status == google.maps.GeocoderStatus.OK) { //setCenter to mid //addMarker var lat = results[0].geometry.location.lat; var lon = results[0].geometry.location.lon; alert(lat); } else { alert("geocoder issue " + status); } } }); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload