Our requirement was to find a way of creating a customer location map that displayed customer locations and key details, such as names and addresses. In addition, we wanted the ability to filter the map results to show only certain categories of customers.
The example uses a copy of our internal customer database, but only provides anonymised information on the individual customers (the customer names and postcodes are not revealed), although obviously the version we use in-house provides full information.
Our Google Maps solution allows you to select customers by type (we should point out that the type “MAD” refers to “Moving Away from DataFlex” and not to any form of mental instability – a little joke of Carol’s we suspect) and status, after which clicking on the Show Map button will display the locations of the selected customers. Hovering the mouse over each marker will pop-up the (anonymised for this example) customer information.
Creating this page involved a number of steps and technologies.
We created a Google GeoCoding client in Visual DataFlex and used that in a program to run through our customer table, storing the returned latitude and longitude results for each row, and pausing for a second every ten requests. It took a little while to process all of our data, but not too long.
With that information stored in the database, the other steps were relatively simple:
- Build a web service that provided customer information, filtered by the requested criteria, including the stored location data (latitude and longitude)
- Create a little Unicorn InterGlobal .PNG marker to use on the map
- Create an HTML web page with the required selection controls on it
If you would be interested in doing something similar for your company, or developing other applications using Google’s or Bing’s rich set of services, please feel free to get in touch.