Knockout Pinpoint
Knockout component to get coordinates/address based on map location
View the demo
Bower
Install withbower 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>