Google Maps, ExtJS and Domino - a Real World Example
I don't know about you, but I find that almost any data can be made more interesting by mapping it.
By using the ExtJS combo box field and Lotus Domino full text indexing, a type-ahead drop down search field can be created that becomes a very efficient way to find data points on the map. And by using Ajax to load the data points in small blocks, the map performs quickly even with large data sets.
Using the free PDQ Portal CMS system (http://www.pdqportal.com), I have created a site that demonstrates these elements together. A Demo site Being familiar with the horse business, I decided it would interesting to create site that would show all of the riding stables in the area on a Google Map. Try it out at http://www.equimap.com.
- Click on any point to see the details of the barn in a popup.
- Use the search field in the toolbar to find any stable by name, town, etc. (click on the results to jump to the point on the map).
- Click on the "view details" link of a popup to jump to a details page.
Search for 'boylan' to find a listing that has a two tabbed popup with pictures and an active 'view details' link. Features
- Data set contains 1500 horse stables.
- Ajax is used to retrieve points in small blocks of less than 100 each as the map is moved.
- When the map is zoomed out past a specified level, a random selection of 500 points is displayed to show a general distribution of the points.
- As the map is zoom in again to a particular area, Ajax is used again to fill in all of the points.
- The map is initially opened to an area near the user based on the user's IP address (using the http://www.maxmind.com service).
- The map position and state are saved so that it will re-open to whatever location the user last dragged it to.
How it was done
- Using the "scrape" feature of the PDQ Portal CMS system, 1500 stable listings where gathered from other web sites into the CMS database using the predefined CM_SITE form.
- Using a "Geolocated" type field that is available in the PDQ Web Forms system, the latitude and longitude for each listing was automatically calculated as the data was loaded (it uses the Google Geocoding HTTP service http://code.google.com/apis/maps/documentation/geocoding/index.html).
- The CMS Configuration document was updated with a Google map key for the the equimap.com domain along with a couple of other parameters to make the Ajax retrievals efficient for the expected point density.
- The home page for the equimap.com site was created using the predefined 'QMMAP' portlet (as well as the BANNER, NAVIGATOR and ARTICLE portlets).
- @Formula's were created to generate the HTML for the popup window.
By the way, if you happen to be interested in horse related activities (as many Domino developers are), please feel free to add a few listings.
|
Ratings
0
|
Comments (4)
You are right Ibby, golf courses and horses don't seem to mix (and sometimes in unexpected ways). One of my wife's students was driving to the barn recently and as she drove past a nearby golf course a ball came in through her open sunroof and hit her on the head! Lucky she managed to stop her car before she passed out. A CAT scan later and it turned out that she had a skull fracture and concussion. The golfer made a clean getaway...
Oh my Alan ... I apologize for my apparent callousness.
I have never hit or come close to a car nor had I hit one of
their horses and until a few minutes ago, was not aware of that
level of injury and personal damage that can I could cause by that
little white object. A little scratch to the paint, maybe a little
dent to a door or a slight bruise to the horses hind quarter was
the worst that I thought
While I feel a tad awkward now, I thank you for the reality
check!
Knowing that this is a very real injury that I can inflict, even
though completely accidental, I chose NOT to play that Black Pearl
nine. I don't think I could live with myself if I had done that.
There are other holes at that place that do not pose that type of
hazard to passing motorists.
Perhaps just skip hole #2 - it could have the added benefit of helping your score - "Equine Hazard - free pass on hole" CPGA Rule 123.22 ;-)