craue / CraueGeoBundle

Doctrine functions for calculating geographical distances in your Symfony project.
MIT License
124 stars 15 forks source link

Add location name (city) to database table #7

Open webdevilopers opened 9 years ago

webdevilopers commented 9 years ago

I think the city resp. location name for a postalCode can be very useful.

I can make a PR for this as soon I am available if you like @craue .

craue commented 9 years ago

The bundle assumes that each postal code is unique for a country and maps to one location (latitude + longitude), which is not exactly the case in the real world. When importing data the same postal code may appear several times for slightly different locations and with different names. So I don't think it's a good idea trying so save the name as well.

webdevilopers commented 9 years ago

I'm thinking about a location search where you choose your country and then type a postal code or city name.

This could then easily be achieved by using your bundles table which adds a great feature, don't you think?

But i get you point too. So for this use case you recommend overriding the addEntries method for the fixtures and extend your existing GeoPostalCode Entity?