Closed Persaeus closed 3 years ago
Thanks @nihilsen ! 👍
Could you add a new test for that field ?
Tests added.
It occurred to me that the Photon API doesn't always provide a "name" property that we can use as the display name.
That's not very useful, so in those cases I think it would be appropriate to construct a placeholder display name using the address components. This produces a display name similar to that given by the Nominatim provider.
It occurred to me that the Photon API doesn't always provide a "name" property that we can use as the display name.
That's not very useful, so in those cases I think it would be appropriate to construct a placeholder display name using the address components. This produces a display name similar to that given by the Nominatim provider.
No, we do not "touch" the result returned by an API.
If there is no name
property fill, the name
should stay null.
Please revert commit 4b91de7 and add a test for a request that returns a name
property.
Thanks.
No, we do not "touch" the result returned by an API.
Got it. That seems reasonable.
Instead of displayName, could you rename it to name, getName(), withName() ?
You got it.
Tests separated.
Thanks @nihilsen !
This PR adds "name" for the photon provider.
Two new methods are added to
PhotonAddress
:getName()
andwithName($name)