Your Development & Design Resource
Google Static Maps API XPages Custom Control Demo
06/29/2012 10:57 AM by Chris Toohey
I'm a big fan of Google Maps, and (when appropriate) I try to integrate them in my applications. They have a knack for giving any app sex appeal. Take a CRM-type application for example. You can supply a user with an address (OfficeStreetAddress, OfficeZip, OfficeCity, OfficeState, OfficeCountry) displayed in a simple table-based layout, or you could display that data and add another row that shows them a hybrid Google Map that plots the given address.
In an attempt to be as efficient as possible when writing XPages applications, I've gotten into the habit of creating simple and reusable Custom Controls that allow me to copy/paste functionality into a given project. My xc:map_static.xsp Custom Control -- which uses the Google Static Maps v2 API -- is a perfect example of one of those reusable Custom Controls.
I'm still making some enhancements to the control, but it's to the point where I'm happy enough with it to show it off:
xc:map_static.xsp Custom Control - Single Marker Demo:
590 Madison Avenue, New York City, New York 10022 US
markerlocation="590 Madison Avenue, New York City, New York 10022 US">
I'll be releasing this Custom Control for download/use at a later date, and will be updating the Demo site frequently... so stay tuned, and let me know if there's anything you'd like to see demo-wise from this control!