designing4u.de Yet Another Coding Blog

26Feb/091

Google Maps and jQuery – loading markers when user moves the map

Recently I was working on a project, in which the goal was to display all company branches within a certain distance, defined by a zip code and a range provided by user input. The solution was pretty simple. A user provides a zip code and the distance range, the script translates the zip code into geographical length and by using the Haversine formula retrieves all branches from the database and displays them in a Google map. This script was only working when a user submitted the information through a form that was provided for this script. As soon as he or she started to play with the Google map, the information about company's branches outside the initial zip code entered were not updated. When one assumes that a company has for instance 1000 Branches and resides in a small country, displaying other branches, while a user is moving within the Google map may be crucial to their search. I had to come up with an idea, how to solve this problem in my jQuery code. This is my solution.

5May/0810

Google maps and jQuery – drop down and clickable maps

I had to manage google Maps for one of the sites I was working on. Basically there were two possibilities to get the user input. Either a user was forced to use one of the drop down options to define an area of the city he or she is living in, or a user could just click on the exact spot on the map where the marker was placed.

   

Pages

Categories

Blogroll

Archive

Meta