YOUR FEEDBACK
Jeremy Geelan wrote: In response to inquiries and suggestions from readers this lexicon has recently...


2008 East
DIAMOND SPONSOR:
Data Direct
Frontiers in Data Access: The Coming Wave in Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
Intel
Virtualization – Path to Predictive Enterprise
Green Hills
IT Security in a Hostile World
JBoss / freedom oss
Practical SOA Approach
GOLD SPONSORS:
Software AG
The Art & Science of SOA: How Governance Enables Adoption
PlateSpin
Effective Planning for Virtual Infrastructure Growth
Fujitsu
Automated Business Process Discovery & Virtualization Service
Ceedo
Workspace Virtualization
Click For 2007 West
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP THREE LINKS YOU MUST CLICK ON


Making Great Mapping Mashups Using Adobe Flex
Geotagging + Spatial & Temporal Widgets = Mapping Magic

To screen scrape the desired info from the page, I used greasemonkey located at http://greasemonkey.mozdev.org/. I always wanted to write a greasemonkey script and here was the perfect opportunity. greasemonkey is a Firefox extension that enables you to install a JavaScript document on the fly. The script is executed when the user navigates to a specific page. The script has access to the document object model and can mutate the document and communicate with a server-side component.

function getXml()
{
var xml = "<data>";
var unorderedList = document.getElementById("news");
var childNodes = unorderedList.childNodes;
for( var j = 0; j < childNodes.length; j++ )
{
    if( childNodes[j].nodeType == 1 )
    {
       xml += "<event>";
       xml += childNodes[j].textContent;
       xml += "</event>";
    }
}
xml += "</data>";
return xml;
}

The above is a script snippet locates the unordered list element (ul) and iterates through its children (li), extracting the text content to compose an XML document. This function is called when the user clicks on the AW Mashup icon in-jected by the script at load time. The XML document is HTTP posted to the server for geo-tagging. The latter is a Web service that scans a document and locates in that document places such as "Beirut" or even more powerful places such as "20 miles north of Haifa, Israel". Each identified placed is returned as part of the Web service response with a latitude and longitude value. The collection of the geo-tagged information is forwarded to a server-side viewer (in my case a JSP page) to produce a page with a spa-tial widget and a temporal widget. The geo-tagger information is then placed on each widget to express its dimension in a visual way. The spatial (map) widget is based on the ArcWeb Explorer (www1.arcwebservices.com/v2006/solutions/awx.jsp). This is a Flash 9 AJAX widget that enables the user to view vector and raster geographic features. It can be controlled using a JavaScript API and enables a developer to add "intelligent" markers with mouse-over effects and mouse-click callbacks. The temporal widget is based on the SIMILE Timeline project (http://simile.mit.edu/timeline/). This is another DHTML-based AJAX widget that enables the user to visualize time-based events. A user can pan the timeline by dragging the timeline horizontally and can repre-sent the event in different bands such as hours and days.

Now, greasemonkey script is executed whenever I navigate to the text-based blog URL. The script screen scrapes the relevant information (ul and li text content) and sends it to the server to be geo-tagged. The geo-tagged information is forwarded to a JSP page that renders the information using the ArcWeb Explorer and the Simile Time-line widgets (see Figure 3).

I hope you enjoyed reading this article. I have included URL references throughout that will give you more in-depth information. In addition, the source code for the items that I have developed are referenced in the resources section.

I would like to dedicate this article to all who died in the aforementioned war.

Resources:

  • Flex2 Rest Sample : http://arcscripts.esri.com/details.asp?dbid=14736
  • News AJAX Mashup : http://arcscripts.esri.com/details.asp?dbid=14737
  • About Mansour Raad
    Mansour Raad is a senior software architect, ArcWeb Services, ESRI.

    LATEST JAVA STORIES & POSTS
    What's the key to team and individual developer productivity in maintaining and extending a large application? Let’s start by making the following assertions: A developer's knowledge of an application code base is likely the single biggest factor of individual productivity. Cor...
    An applet, a Java program that runs in a browser, often has to access the client resources. However, the security manager prevents an applet from accessing client resources. To access client resources, the applet has to have the proper permission. With this permission the applet ...
    Three-letter acronyms (TLAs) are hardly new in Information Technology: EAI, ESB, SOA, BPM, BAM, ETL, MDM; the list goes on and on. This article is about yet another three-letter acronym, EDA, which stands for Event-Driven Architecture. EDA is not a brand new technology, but rathe...
    Furthering its dedication to providing Java developers productivity with choice, Oracle announced the Oracle Enterprise Pack for Eclipse, a new component of Oracle Fusion Middleware. This release marks the first free Eclipse 3.4 environment to support Oracle WebLogic Server 10g R...
    Two of the biggest launches in Rich Internet Application history took place in 2007/2008 when Adobe launched AIR 1.0 in February '08 and Microsoft launched Silverlight (September '07). At the 6th International AJAXWorld RIA Conference & Expo in October SYS-CON Events is delighted...
    Red Hat CTO Brian Stevens, Citrix CTO Simon Crosby, Egenera CTO Pete Manca, Allen Stewart, Group Manager, Windows Virtualization at Microsoft, and Brian Duckering, Sr. Director of Products and Alliances at Symantec were the top industry executives who joined Jeremy Geelan in the ...
    SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
    SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
    Click to Add our RSS Feeds to the Service of Your Choice:
    Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
    myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
    Publish Your Article! Please send it to editorial(at)sys-con.com!

    Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


    SYS-CON FEATURED WHITEPAPERS

    SPONSORED BY INFRAGISTICS
    There are many forces that influence technological evolution. After a decade of building enterprise ...
    2008 is going to be an important year for Rich Internet Applications. Most organizations are deliver...
    The OpenAjax Alliance is developing an Ajax industry wishlist for future browsers, using a dedicated...
    In every field of design one of the first things students do is learn from the work of others. They ...
    Infragistics announced the availability of two Community Technology Preview (CTP) User Interface (UI...
    The YUI development team has released version 2.5.2; you can download the new release from SourceFor...
    ADS BY GOOGLE
    BREAKING JAVA NEWS

    SpringSource, a leading provider of infrastructure software and the company behind ...