Forum Academy Marketplace Showcase Pricing Features

Using a geographic address other than the user's current geographic position

I’m trying to create a list of results based on a user entered geographic address. I’ve scoured the forums and have seen various questions that touch around this subject, but don’t hit the mark.

I know there’s an implementation where you can use the user’s current geographic position, but the issue I have with that is I’m trying to allow users to see opportunities in different cities. See Figure 1.

Figure 2 shows the ideal solution, but it doesn’t work at all.

Figure 3 shows a hack, but you’ll notice that filtering will bring the relevant search results to the top of the list, but you will still have other cities listed which defeats the purpose.

I appreciate any thoughts/tips.

Do you have cities stored in the database?

No I do not. Currently I use a static dropdown menu with cities listed.

The best way to this is to create a table that holds the places you want and add another column that holds the geolocation. By the way you can also use lat and long.

This way you can pass the values to the map

Do you have an example of this implementation? My content is user generated, so I can’t create a table with every possibility. More so, the issue is with the “Dropdown Select Location’s value” - so if your suggestion is to make that a dynamic list based off a table of cities (vs. using a static list), I can try that.