laravel_cities icon indicating copy to clipboard operation
laravel_cities copied to clipboard

Geospatial support

Open Zen0x7 opened this issue 5 years ago • 2 comments

Hi @igaster

This package is awesome. What you think about support laravel-mysql-geospatial package?

With this you can get near cities.

Zen0x7 avatar Mar 13 '20 19:03 Zen0x7

I'm assuming you mean this one https://github.com/grimzy/laravel-mysql-spatial ?

I too came here looking for a package that would make it easy to, for example, return the city nearest to a given coordinate (lat/lng). It doesn't appear at first glance that this is what this package is intended for... but maybe I'm mistaken... care to comment @igaster ? Does your package support reverse geocoding queries? Ie I pass it the lng/lat and it returns cities nearest to that location sorted by distance to?

vesper8 avatar Apr 06 '20 21:04 vesper8

Hi @vesper8, that feature should be nice.

Currently lat and lng columns are stored using string type. =(

Maybe if we or w/e change the column type to spatial type then reverse geocoding can be posible.

Zen0x7 avatar Apr 06 '20 22:04 Zen0x7