Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

lucakuehne's avatar

Google Maps without longitude and latitude

Hi

I want a Map integration in my Laravel App. I have an address and I want to show that address in the map with a marker. I found a few Laravel packages, but they all require a longitude and latitude. But I just have an address and no longitude nor latitude. Can anyone suggest me an easy way of realising that with just an address?

Greetings Luca

0 likes
6 replies
spekkionu's avatar
Level 46

In that case you will have to use the javascript api with means using geolocation to get the latitude and longitude from the address.

You can do it with javascript using the google maps geolocation api.

https://developers.google.com/maps/documentation/javascript/geolocation

You can also do the geolocation lookup server-side and just the map rendering in javascript.

https://github.com/thephpleague/geotools

https://github.com/geocoder-php/GeocoderLaravel

1 like
lucakuehne's avatar

@spekkionu So there is no "all-in-one" solution for this as I assumed.. :/ Thank you very much :-)

tejedamiguel6@aol.com's avatar

Could i also use this to link to a database? currently making a graduation project where I am trying to implement google maps API and my database. I have been researching for days, and cant seem to find anything. This is the best I have found. If anyone has any pointers, let me know. Thanks!

Please or to participate in this conversation.