Basic Map Widget
Let's first look at a very simple example: you want to create a widget for navigating a shapefile (or a PostGIS table that defines some geographical region). For that you need first to create a MapServer mapfile:
MAP [...] LAYER NAME "montreal" TYPE line DATA "montreal.shp" CLASS STYLE COLOR 105 105 105 END END END END
var dmap = new dracones.MapWidget(/* some params */);
Which creates this map, anchored to a
in the page, that you can pan by dragging with the left mouse
button, zoom in/out with the mouse wheel or by double-clicking
SHIFT + double-clicking (out) (or rectangle
zoom by dragging while holding
You can have as many map widgets as you need on a page, each with their own config options.
Let's follow with a slightly more complex example.