knockout-pinpoint

Knockout component to get coordinates/address based on map location


Keywords
knockout, Google Maps, Map
License
MIT
Install
bower install knockout-pinpoint

Documentation

Knockout Pinpoint

Knockout component to get coordinates/address based on map location

View the demo

Install with Bower

bower install knockout-pinpoint --save

How to Use

require the script and use it as a binding handler:

<span data-bind="pinpoint: coordinates"></span>

where coordinates is an observable you want two-way bound to the component. the coordinates should be a google.maps.LatLng object

if you want to pass in empty coordinates, and let the pinpoint component figure out the coordinates based on an address, you can pass an additional binding handler (address) that the component will use to geocode the initial coordinates:

<span data-bind="pinpoint: coordinates, address: address"></span>