Monthly Archive for January, 2012

Google Maps based Area Mapping Tool

I kludged together an online Google Map tool for our ministry staff this week.

After trying it out for a little bit I am putting it here on the community to help others and to improve it.

There is a live instance available at http://osministry.com/map/ and I included the files in a zip here: http://osministry.com/map/files/

CSVMap

The tool itself is just an html file relying on Javascript and the Google Maps API V3. It does not need an API key so it will work on any domain name without you having to register your own.

Included is a file called csv.php. I code in php, but since not everyone else does I kept all code in a separate file so you can easily make your own and just change the file name listed in the javascript.

This tool was really built for designing Area Maps for ArenaChMS, but a little adaptation will make it usable for other purposes.

You can click on different locations and it will gather together the coordinates of those locations into a textarea which is then exported out as a  csv file ready to be imported with the ImportArea.exe file that Arena Support can provide (I would rather point you to them for support on that).

New features I would like:

Importing a list of coordinates – I would like to be able to take a list of coordinates from either the CSV or from an Arena exported xls file and import them into the tool so that we can more easily edit shapes in the future.

Closing the shape – The Google API version of this tool (here) has a “Close PolyShape” button that would close the shape back on the original coordinates. I found that our ministry staff liked this feature even though it put an extra identical coordinate in the list. I would filter that last one out when creating the csv, but it does help to visually close the map for people.

Clean up the file – The index.html file is a mess. As I said, I kludged it from another tool and so I left a lot of the extra stuff in there as reference as I worked on features. At some point I really should get rid of all the stuff I set to “Display: none;” or commented out.

Giving credit where it is due, the original file I started with was from http://www.birdtheme.org/useful/v3tool.html

ArenaChMS users can discuss this tool in the community here.