An open API service indexing awesome lists of open source software.

https://github.com/benignware/jquery-placepicker

A simple placepicker component for the google-maps api.
https://github.com/benignware/jquery-placepicker

Last synced: 11 months ago
JSON representation

A simple placepicker component for the google-maps api.

Awesome Lists containing this project

README

          

jquery-placepicker
==================

A simple placepicker component for the google-maps api.

[Demo](http://benignware.github.io/jquery-placepicker)

Usage
-----

Include dependencies.
Be sure to add Google Places.

```html

```

```html

```

```js
$(".placepicker").placepicker();
```

Advanced usage
--------------

### Integrating a map view

This example shows how to integrate a collapsible map-view using bootstrap.

Include Bootstrap Collapsible and styles.

```html

```

```html







```

```js
$(".placepicker").placepicker();
```

```css
.placepicker-map {
min-height: 250px;
}
```

Options
-------


TypeNameDescription


HTMLdata-latitudePreset the map's latitude


HTMLdata-longitudePreset the map's longitude


HTMLdata-latitude-inputSet the DOM ID of the input field to populate with the latitude


HTMLdata-longitude-inputSet the DOM ID of the input field to populate with the longitude


HTMLdata-map-container-idSet the ID of the
element containing the map's destination element. Configuring this
will automatically inject an open/close button to show/hide the map.
The container must have Bootstrap's "collapse" CSS class.


JavaScriptmapMap selector or map-element


JavaScriptmapOptionsAn object with google maps api options


JavaScriptplaceChangedThis callback is fired when location changed

Methods
-------


NameDescriptionReturn


reloadReloads mapvoid


resizeResizes mapvoid


geoLocationSet value to html5 geo-locationvoid


getLocationReturns an object containing the current locationvoid


getLatLngReturns an object of type google.maps.LatLng containing the current location LatLng