Use maps inside plugin

you will have to index your location field as geo_point . Or you could create a geo point runtime field.