Hey,
I have a google Maps with API on my website and want to set multiple Markers.
The problem i have is, that my DB only has adress fields, none for long/lat.
I would need a code, that converts the adress ( Amtsstube in Washington, D.C., USA) into a long/lat value.
Then I can insert these value in the maps code.
I know I can make a long and a lat field in the DB, but that’s a lot of work.
Is it even a good idea to convert the address to lat/long, or will the loading time increase if I have 200 entries or more?
Maybe @yisrael-wix can help. You already made a lot of examples with Google Maps, but I haven’t found a example to convert adresses.
Hey, thanks for you quick answer, but I’ll do it differently.
The problem is, that Google wants money, for every converted adress and I need the lng/lat for another project.
I want to make a “location-filter” like this:
On the left side you can search for a place, on the right side you can set the radius.
When you click search, the search word (Berlin) gets converted into lng/lat by a google service, then I get the lng/lat coordinates back.
Then I calculate the deviation (in lng/lat) of the target per km.
Let’s say 10km =+/- 1° lng/lat. Now I have 3 coordinates:
-
the search word (let’s say “Berlin” is 10°/10°)
-
Value1 = -1 = (10°/10° -1° (for 10km)) === 9°/9°
-
Value2 = +1 = (10°/10° +1° (for 10km)) === 11°/11°
Now I can set the filter and search for all entries between 9°/9° and 10°/10°
And that’s why I need the lng/lat for every entry in my DB.
That’s my plan until now 
Is this a good idea to code a filter like this?
That’s just the theory, I don’t know if it will work.