Understanding Mapping in Drupal
Map Presets
ctools plugins
What is OpenLayers?
Web Mapping Javascript Library
Free (BSD License)
Originally by MetaCarta
openlayers.org
Open Street Map
What is the OpenLayers Drupal module?
Build Maps with Drupal-friendly objects.
Export with Features.
Integrate with popular Drupal structures.
User-friendly.
Architecture and API
Layer Types
Behaviors
Styles
Layers
Settings
Building Maps
OpenLayers Source
Hosted version from openlayers.org
Compiled version
Set CSS path
Set Image path
Preset Default
What map to use by default.
Layers
Layer Instances
Layer Settings
Layer Types
API Keys
Library files
KML
Vector
Google
OpenStreetMap
Cloudmade
etc.
OpenStreeMap Mapnik Tiles
Vector Layer
Views data, points, lines, etc.
Google Tiles
Behaviors
Behaviors are varous features and functions of a map, from popups to keyboard controls to zooming.
Attribution
Pop Up
Fullscreen
Layer Switcher
Mouse Position
PanZoomBar
ZoomBox
Styles
Styles are how vector features look,
like points/markers, lines, etc.
Map Presets
Map settings
Layers
Behaviors
Styles
Map!
Storage
Code
Database
Image Path
CSS Path
Proxy Path
Center and Zoom
Map Projection
The absolute Drupal, or full URL to a directory of image overrides for the OpenLayers interface.
The absolute Drupal, or full URL to a directory of css files to override the OpenLayers interface.
As Javascript is not allowed to get data from a different domain, a proxy is needed if you want to pull data from external sources.
The new adds native support for an HTTP proxy in Drupal!
Proxy module
Either using a helper map or manually entering in textbox, you can easily set the default center point and zoom levels.
The map projection determines what layers are avialable and obviously the projection of the map itself.
The display projection determines how features and other interactions are handled.
Overall, you don't need to change these.
About
CCK
Views
Filters
yourmodule/
yourmodule.module
layer_types/
layer_class_name.inc
layer_class_name.js
yourmodule.module
Layers are defined in a hook are basically
instances of layer type classes.
Map Presets are simply defined in a hook.
yourmodule.module
Layer Types are defined as a class and
Javascript processor.
Styles are defined in a hook and are a collection of visual properties.
yourmodule.module
hook_openlayers_styles_info()
Variable styles coming soon to 2.x
hook_openlayers_presets()
Map Array
hook_openlayers_layers_info()
hook_openlayers_layer_types()
Layer Type Class
Layer Type Javascript Handler
yourmodule/
yourmodule.module
behaviors/
behavior_class_name.inc
behavior_class_name.js
hook_openlayers_behaviors()
Behavior Class
Behaviors Javascript Handler
Behaviors are classes that manage the settings and PHP with a javascript handler to provide functionality.
All main objects are ctools plugins.
Easy to store, override, clone, import, export.
Built-in Features integration.
Less code.
At it's core, the Drupal OpenLayers module
aims to provide a Drupal-friendly way of
creating maps and integrating with data
in Drupal
Module Versions
0.x
Alpha
Built for Managing News
Discontinued/Unsupported
1.x
1.0-RC1 (1.0 soon)
Stable.
First draft.
No new features.
2.x
Major architectural changes.
Major UI improvements.
Alpha.
Managing News is using.
This presentation.
How You can Help
Testing.
Documentation.
Patches.
Support.
Drupal Input Filter
By using specific syntax, you can easily put map presets directly into content
simple macro
inline map
WKT Field
WKT (well-known text) is used to store points, lines, or polygons which can be inputted via the mapping interface as a CCK field
WKT Map Editor
Formatter
Don't forget to set your field display, which can be any map.
Views Data Layer
Views Map Display
Using views, you can provide an overlay layer of geographical data to map presets.
Views Display Plugin
Views Style Plugin
Views Data as Map Overlays
Use views to display maps in the same places you would normally like pages and blocks.
View
Style
Plugin
Choose Preset in Style Options
Map in a
Block
Questions? Comments? Maybe Live Demo?
Main Developers
zzolo: Alan Palazzolo
tmcw: Tom MacWright
phayes: Patrick Hayes
Layer Settings
Layer Types
Attribution
Popup
Fullscreen
Layer Switcher
Mouse Position
PanZoom Bar
Zoom Box
Thank You
with OpenLayersMore presentations by Alan Palazzolo
Popular presentations
Future-Proof Your Education
Maria Andersen on
How do you prepare for uncertain career paths where technical knowledge doubles every two years? You pay attention to the skills that surround the content: ...
More popular prezis in Explore>