Google Geolocation API


In addition, all area boundaries are indicated by a marker (the zip code). This marker can also be selected, which opens a popup that can again be equipped with any text. The example image shows that the zip code is displayed, as well as another text with a link, which also contains the zip code so that it can be used for other purposes.
The script reacts to GET parameters in the browser, which determine the color and selection of the postal codes. An example call with only one zip code would look as follows with the default settings: ?script.php?zip=46509&mColor=ff0000. The parameter names can be changed as required.
Since the aim of the project was to be able to mark surrounding zip codes for a main zip code with two different colors, there are additional parameters: script.php?zip=46509&mColor=ff0000&rZip=46459,47665&rColor=0000ff&fZip=46487&fColor=00ff00.
As can be seen in the example, several zip codes can also be entered, in this case separated by commas. The separator can also be changed as required. The script accepts 3 different types of zip codes, each with a color, and displays them in color on a Google Maps map.
