CodeIgniter Google Maps V3 API Library
In early May 2010 I wrote a Google Maps API library for CodeIgniter. This used Version 2 of the Google API and was pretty limited.
Well, I’ve been working tirelessly over the past weeks to get a new version wrote that uses Version 3 of the API instead and I am very pleased to announce that it is now avalaible for download.
The library enables you to create a map and overlay multiple markers, polylines, polygons, rectangles, ground overlays and/or circles, all of which are fully customisable. The library also supports showing directions between two points, including the ability to show the textual directions alongside the map too, and marker clustering. The first stages of integration with the Google Places API are available for use too.
To get a copy, read the documentation or to view a demo simply follow the links below:
Download Library (Last updated 1st February 2013)
View Documentation PDF (185kb)
The demonstrations above are basic examples of what can be achieved by using the library. I recommend you read the documentation to view a full list of configurable options.
An Introduction to using the Library (Watch on YouTube)
- Change the maps appearance including zoom, central position, size and control positioning.
- Add multiple markers, ground overlays, circles, rectangles, polylines and polygons. Add them all on the same map, each with a whole host of configurable options to change the appearance and how they function.
- Add event handlers to all items on the map. This means you can perform a custom action when, for example, a marker is dragged, or the map is clicked.
- Too many markers? Enable marker clustering to speed up and clean up your map.
- Geocode lookups. You don’t need to know the exact lat/long co-ordinates to center the map or add a marker. You can use a building name, an address, an area, in fact any textual location will work.
- Drawing Manager library integration
- Add traffic, bicycling and Panoramio overlays.
- Add directions by specifying a start and end point, as well as having the option to output the textual directions to a separate element on the page.
- Caching of Geocode requests. Speed up the map by caching any geocode lookups made.
- Integration with the Google Places API.
- Support for HTML5 geocoding meaning you can center the map on a user’s location.
- Support for use within an application using HTTPS
- Allows you to integrate with your Google Adsense account and overlay ads on top of the map.
- Support for creating multiple maps on the same page
- Support for KML and GeoRSS Layers
- Viewport Marker Management
- Extensions to the directions integration
- Extensions to the Google Places API integration
- Possible integration with the Elevation API
If you have any questions, spot a bug, have any feature suggestions or would like to leave feedback please leave a comment below or drop me a line.
There is a lot of functionality to be added to this library soon so keep checking back for any progress or follow me on GitHub.