Geocomplete

Example: Custom HTML Attribute

Back to Documentation
  • Location:
  • Route:
  • Street Number:
  • Postal Code:
  • Locality:
  • Country Code:
  • State:

Source:

// HTML
<ul>
  <li>Location: <span data-geo="location"></span></li>
  <li>Country Code: <span data-geo="country_short"></span></li>
  ...
</ul>

// JavaScript
$("#geocomplete").geocomplete({
  map: ".map_canvas",
  details: "ul",
  detailsAttribute: "data-geo"
});