![]() |
Building a Mapping Application Leveraging GoMMaPIntroductionOne of the services offered by the GoMMaP Portal is a mapping application development service. This service allows you to quickly and easily incorporate the type of interactive web mapping application you see in this portal into your own website.. GoMMaP makes this possible by offering an implementation of the Chameleon Service Instance that allows you to host your application on your server and leverage the GoMMaP service to process your web application and draw your map. You can get more information about the open source Chameleon technology at http://www.maptools.org/chameleon/. Creating your own application involves setting up an application template, which is an HTML document with specialized mapping tags, and creating a map (or "map context") through the GoMMaP Portal. The two resulting documents can be maintained on any internet-accessible directory on your own server without any other specialized software required. Overview of Chameleon Web ServiceFor a description of the Chameleon web service that you can leverage, please see the Chameleon Service Primer. Creating Your Own TemplateThe first requirement for your mapping application is a 'template'. A template refers to an HTML file that contains special tags that GoMMaP's Chameleon service instance can understand. To obtain a sample template for starting reference please download the sample files here. Extract the "gommap_sample.zip" file to a web-accessible directory. A directory named "gommap_sample" is created containing a few files, including:
The sample template contains basic mapping functionality such as zooming in, zooming out, zooming to the full map extents, and querying. To view the sample template, enter the following URL into your web browser, and modify the TEMPLATE and CONTEXT paths to your local web-accessible location of the sample files:
http://www.gommap.org/cwc2/cwc2.php?service=VCG&request=GetApplication
&version=0.1.0&LANGUAGES=en-CA&TEMPLATES=http://path/to/your/sample_template.html
&CONTEXTS=http://path/to/your/sample_context.xml
If you would like to modify the template please see the following docs: Creating Your Own Map ContextThe second requirement for your mapping application is a map "context" file. A context is basically a map composition, meaning that it is a mapping file that describes how your map appears (where the data comes from, what mapping extents your map view is, etc.). The file is actually an XML document. If you entered the above URL and modified the appropriate paths in the URL you would see a map of the Gulf of Maine area, which is specified in the "sample_context.xml" file. To make it easy for you to create your own map context file (or map composition), and not have to modify the XML file directly, you can use the Map Builder application. The Map Builder application allows you to do the following:
Viewing Your Custom ApplicationOnce you have a map context file that you are satisfied with (using the Map Builder application) and a template that contains the functionality that you desire, you can load your new application by using the following URL and modifying the appropriate TEMPLATE and CONTEXT paths as before:
http://www.gommap.org/cwc2/cwc2.php?service=VCG&request=GetApplication
&version=0.1.0&LANGUAGES=en-CA&TEMPLATES=http://path/to/your_template.html
&CONTEXTS=http://path/to/your_context.xml
You should now have a live mapping application that appears like this. Notifying GoMMaP of New Public ApplicationIf you have a live mapping application that leverages the GoMMaP Application service or any Gulf of Maine data through Open GIS Consortium specifications, we want to know about it. Contact us at info@gomoos.org and we'll add a reference to your application on the GoMMaP portal. |