View Source

h2. Overview
Uses the google places api to create a text-box that will auto-complete location entries, centering the map to the location chosen and returning information to specified variables in the backing bean. NOTE: To use this component, you must append 'libraries=places' to the end of your gMap key in the web.xml document.


{tip}See the ICEfaces Showcase [Live Demo|http://icefaces-showcase.icesoft.org/showcase.jsf?grp=aceMenu&exp=gMapAutoCompleteBean] of this component, complete with source code.{tip}

h2. Getting Started
{code}
<ace:gMap style="width: 675px; height: 500px" id="gMap">
<ace:gMapAutocomplete style="xAlign:left" window="${gMapAutoCompleteBean.showWindow}" address="${gMapAutoCompleteBean.address}" types="${gMapAutoCompleteBean.types}" url="${gMapAutoCompleteBean.url}"/>
</ace:gMap>
{code}

h2. Attributes
{tip:title=TagLib Documentation}

This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available [here|http://www.icefaces.org/docs/v4_latest/ace/tld/ace/gMapAutocomplete.html].
{tip}

{panel}
The backing bean property to store the text value of the *address* selected by gMapAutocomplete.
{panel}
{panel}
*latLng* The backing bean property to store the lat/lng coordinates of the address selected by gMapAutocomplete. Format: "(0.000000,0.000000)".
{panel}
{panel}
The backing bean property to store the array of *types* that Google determines match the address selected by gMapAutocomplete.
{panel}
{panel}
The backing bean property to store the *url* attributed to the address selected by gMapAutocomplete.
{panel}