Closed QuentinFchx closed 9 years ago
Finally, my use-case will be too specific to be implemented here. I'll fork. Thanks for the library tho ! :)
What is your use case? I don't think that a default list of locations is too specific. That sounds like a great feature
I wanted to store the n
lasts locations that the user selected, and to display them each time they start a new search.
I started my own implementation:
I use the localStorage
to store them and it causes the following issue:
Google wrap its geometry.location
property into a LatLng object and it's obviously lost when you store it.
To fix this, I instantiate another LatLng
each time I retrieve the history from the localStorage
but I think this is too specific for this library.
I see. Yeah, with this kind of side effect it's a bit too much.
Use case: I'd like to display the last places that the user selected when they "open" the widget.
We could pass a list of location to the directive through an attribute and init
scope.locations
with it. I will come with a PR tomorrow !