2 Replies - 584 Views - Last Post: 01 August 2014 - 01:56 PM

#1 ben_jamin  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 74
  • Joined: 10-March 14

geocomplete doesnt return lat and long

Posted 01 August 2014 - 09:33 AM

I have this geocomplete code
$("#property_address").geocomplete();



My php is
<fieldset>  
<label for="FindAddress">address
	<span class="red">*</span>
</label>
<div id="property_autocomplete">
	<input id="property_lat" name="lat" type="text" value="">
	<input id="property_long" name="lng" type="text" value="">
	<input id="property_address" name="address" type="text" value="">
</div>
</fieldset>



The problem is that the address return as should but lat and long remain empty.
What am I doing wrong?

Is This A Good Question/Topic? 0
  • +

Replies To: geocomplete doesnt return lat and long

#2 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3619
  • View blog
  • Posts: 12,481
  • Joined: 12-December 12

Re: geocomplete doesnt return lat and long

Posted 01 August 2014 - 11:17 AM

That doesn't look like the example at this documentation:
<form>
  Latitude:   <input name="lat" type="text" value="">
  Longitude:  <input name="lng" type="text" value="">
  Address:    <input name="formatted_address" type="text" value="">
</form>
$("input").geocomplete({ details: "form" });

Quote

You can pass details as an option to specify a container that will be populated when a geocoding request was successful.

I can't see that applying geocomplete() (without arguments) to a single input will automatically populate other inputs that happen to be nearby.

Read through the documentation, and examples, again.
Was This Post Helpful? 1
  • +
  • -

#3 ben_jamin  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 74
  • Joined: 10-March 14

Re: geocomplete doesnt return lat and long

Posted 01 August 2014 - 01:56 PM

oh boy. my bad.
I used #property_address which is for a specific location.
fixed. thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1