Project

General

Profile

1
<h2>Simple map</h2>
2

    
3
<p>
4
  In it's most basic configuration, mapbuilder can be used to simply put a map
5
  in a web page.
6
</p>
7

    
8
<div id="mainMapPane" style="float:right"></div>
9

    
10
<p>
11
  The configuration for this page consists of a single 
12
  model (a Web Map Context document) and a single widget (a MapPane).
13
</p>
14

    
15
<p>
16
  The model ID can also be used as an HTTP request parameter to initialize the 
17
  model from a URL.
18
  For example, this page can be loaded with a different map using 
19
  <a href="javascript:config.loadModel('mainMap','/mapbuilder/demo/data/context/modisWorld.xml')">
20
    JavaScript
21
  </a>
22
  or 
23
  <a href="?page=samples/tutorial1&mainMap=/mapbuilder/demo/data/context/cded.xml">
24
    by a parameter in the URL.
25
  </a>
26
</p>
27

    
28
<p>
29
  The MapPane widget renders the model as a set of stacked images and 
30
  inserted into the page.  
31
  The 'htmlTagID' in the config file is used to associate 
32
  the MapPane with an HTML page element, in this case a &lt;DIV&gt; element
33
  which has it's CSS style set to float on the right hand side of the page.
34
  The HTML for the widget is generated by applying an XSLT stylehseet to the model.
35
</p>
36
<p>
37
  The ID assigned to the model can be used to reference the methods and properties
38
  of the JavaScript model object as 'config.objects[modelId]'.
39
</p>
40

    
41
<p align="right"><a href="?page=samples/tutorial2">next</a></p>
42

    
(3-3/12)