110 likes | 204 Views
Introducing Mapbuilder. Michael Adair Natural Resources Canada. Introduction. Mapbuilder-lib consists of JavaScript components to build geographic client applications within a web browser. Leverages OGC specifications for web mapping: Context, WMS, …
E N D
Introducing Mapbuilder Michael Adair Natural Resources Canada
Introduction Mapbuilder-lib consists of JavaScript components to build geographic client applications within a web browser • Leverages OGC specifications for web mapping: Context, WMS, … • Retrieves XML documents (and images) dynamically at run-time using HTTP • Renders XML documents to HTML using the browser’s built-in XSLT processor • Object-oriented architecture using the Model-View-Controller (MVC) design pattern
Design Drivers • Client is a web browser • Minimal server side requirements • Easy to incorporate libraries into a web page • Keep bandwidth to a minimum • Use JavaScript/DHTML, XML/XSL • Modular design • Open source (GPL) • Attract developers
MVC design pattern Model • maintains the state and data of the application - the XML document View • A rendering of the XML document Controller • The user interface presented to the user to manipulate the application The MVC pattern forces one to think of an application in terms of three modules:
The configuration file All mapbuilder applications are initialized from an XML configuration file • Closely follows the MVC design pattern to define models, widgets (views) and tools (controllers) used in the application • Links the HTML elements to JavaScript objects via ID attributes • Follows Object-Property-Value rule of RDF and GML
Using Mapbuilder • Download the library and install on a web server • Create the HTML for your page and identify elements where mapbuilder content is to be inserted • Create your configuration document • Include the JavaScript library and initialize
Simple example page <html> <head> <title>Mapbuilder Demo</title> <script> // URL of Mapbuilder configuration file. var mbConfigUrl='config/SimpleConfig.xml'; </script> <script type="text/javascript" src="../lib/Mapbuilder.js"></script> </head> <body onload="mbDoLoad()"> <div id="mainMapPane"></div> </body> </html>
Demos • Mapbuilder User Guide (Quicklook server) (Localhost version) • Reference implementation (Quicklook server) (Localhost version) • Loading external URLs
Features • Very easy entry point to web mapping • Extensible • Consumes standards-based web services, primarily from the OGC • Runs in IE6, Mozilla 1.3+, Netscape 6+ • Very responsive client – no page reloads
Future plans • Support for more models, widgets, tools • from user requirements • WFS client: via WMS/SLD and/or SVG • depends on OGC context spec evolution • WFS-T client: add/edit features • depends on WFS-T server • Applications: simple to complex • Allows community to make maps • Context editor
Contact Info • http://mapbuilder.sourceforge.net • Mapbuilder mailing list: mapbuilder-devel@lists.sourceforge.net • mike.adair@nrcan.gc.ca Also at the NRCan booth in the exhibit area