Forum Post: RE: Rollbase selectQuery and Google maps callstack

  • Thread starter Thread starter alexanderg@qbcon.com
  • Start date Start date
Status
Not open for further replies.
A

alexanderg@qbcon.com

Guest
Hi Gian, can I actually load the google maps API as a hosted file? The error I'm getting with the "rbv_api.sendHttpGet" method is: Error http://maps.googleapis.com/maps/api/geocode/json?address=28+3rd+Street+Menlopark+Pretoria+ZA&key={API-KEY} (line #11) in formula: var rbv_api = new Packages.com.rb.core.services.api.ServerSideAPI(1, 5790); function getLat() { var city = ", " + "Pretoria"; var country = ", " + "ZA"; var address = "28 3rd Street Menlopark" + " " + "Pretoria" + " " + "ZA"; address = address.replace(/ /g,"+"); This is the original formula that I've entered: function getLat() { var city = ", " + "{!city#value}"; var country = ", " + "{!country#code}"; var address = "{!streetAddr1#value}" + " " + "{!city#value}" + " " + "{!country#code}"; address = address.replace(/ /g,"+"); var result = rbv_api.sendHttpGet("http://maps.googleapis.com/maps/api/geocode/json?address="+address+"&key=AIzaSyCQBMnqH-q8etEl3CDOQHQaosd1LSXz_GM"); return result.results[0].geometry.location.lat; } getLat();

Continue reading...
 
Status
Not open for further replies.
Back
Top