Problem solve Get help with specific problems with your technologies, process and projects.

Developing an interactive map app

Hi. I wish to include an interactive map (using ESRI's ArcIMS) in a Lotus Notes form. Generally, the map is implemented using HTML, Javascript and GIF or JPG images (of a map). The client generates XML, which, sent to a Web map server through a Java servlet connector, generates a XML reply. That reply may include the name of map image resultant from a user zooming in, panning, etc. The client, when it receives advice of a new map, refreshes the view the user sees.

My development expertise in Notes and Domino is limited. Could you please advise how the map app might be implemented in R5?

We definitely want the map to appear in the Lotus Notes form, rather than a browser. The objective is to have the user navigate (by search for name/pan/zoom, etc.) to a location where he will place a point with the cursor. That point will be communicated by XML back to the Web map server, which will generate a reply indicating town name, etc. It is hoped then to use these values to populate fields in the form.
I'm not familiar with the specific map generation software you're referring to, but it doesn't sound like there's anything there that you couldn't do in the Notes client, except that Notes doesn't do DHTML. It sounds like you have a servlet running on your server, communicating with the map server via XML-formatted messages. That part is not particularly important -- the key question is how does the map server notify the Notes client about the availability of new content, and what form does the new content take? It sounds like it would be HTML that includes references to image files.

Since the Notes client doesn't support user-programmable messages from the server, you would need to have code running in the Notes client to poll for new content. Since you want to display a form, this might most easily be done by putting a Java applet on the form. JavaScript code running in the Notes client could call a method of the applet every few seconds to ask for new content, the applet could ask the servlet (perhaps by a HTTP get request or Web services call) and the response would filter back to the JavaScript code.

What the JavaScript code would do if there was new content is a whole other question. If there's a new page of HTML to display, that could be passed back to the JavaScript code, but since Notes doesn't support DHTML, there's no really easy way to display it in real time. Also, the HTML would contain references to images that would presumably be stored somewhere -- perhaps on the Domino server. To display this HTML requires a little subtlety. One way to do it is to put a computed Rich Text field on the form and check the option to store it in MIME format. You can then write LotusScript code (in a hidden button so that you could invoke it via the click() method from JavaScript), which deletes the old field contents, takes the HTML received from the map server, inserts it into a new MIME field (using the NotesMIMEEntity class) and then redisplays the Notes form. The way to redisplay a form you're on and refresh the contents of Rich Text/MIME fields, is as follows:

        Dim wksp As New NotesUIWorkspace 
        Dim doc As NotesDocument 
        Dim uidoc As NotesUIDocument 
        Set uidoc = wksp.CurrentDocument 
        Set doc = uidoc.Document 
        doc.SaveOptions = "0"  
' actually you probably already 
have this on the form 
        uidoc.Close True 
        Call wksp.EditDocument (True, doc) 
There is one hitch -- if your applet is on the form this will unload and then reload and reinitialize it, which could slow things down. You might try creating a frameset with the applet in one frame and the refreshable content in another, but I don't offhand know whether there's a way to refresh the content frame using JavaScript.

Dig Deeper on LotusScript

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.




  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...