Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow stringable object to be used to geocode address #351

Open
ker0x opened this issue Jan 29, 2024 · 2 comments
Open

Allow stringable object to be used to geocode address #351

ker0x opened this issue Jan 29, 2024 · 2 comments

Comments

@ker0x
Copy link
Contributor

ker0x commented Jan 29, 2024

Currently, only addresses in string form can be geocoded. It would be interesting to enable objects that can be represented as strings (with a __toString() method or by implementing the \Stringable interface) to be geocoded too.

@norkunas
Copy link
Member

Is this limitation exists only in this bundle?

@ker0x
Copy link
Contributor Author

ker0x commented Jan 29, 2024

I think so, because I was referring to the GeocoderListener which only checks a property or a getter returning a string.

In my case, I store the address in an embeddable doctrine object which implements the Stringable interface. I could simply add a getAddressAsString method with the Address attribute, but having the ability to directly mark my getAddress() getter would be a nice improvement.

I'll be able to work on a PR when I've finished fighting the test failure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants