Archive for April, 2012

Embed Google Map with several locations (GeoCode addresses and display “info window” for each marker)

1. Include javascript at the top of the page. It will create a map, get a string of addresses and their respective “project names” and “amount of images” from a form that we fill during the database fetching process (see Step #3 below).

The script will then geocode each address (get latitude and longitude) and place a marker on the map. By clicking on the marker you will get an “info-window” (in our example – with project name and the amount of photos for each project). We specify the image for the marker as well.

Continue Reading No Comments

Form-based paging with PHP and JavaScript

If you have a blog or news section on your custom website, which you want to separate by pages, use the steps below to implement a paging module. First, I usually create a file called pager.php in your /includes/ folder. The content of that file is below:

Continue Reading No Comments