1 | |
---|
2 | Current for 6.x-2.0-alpha2 |
---|
3 | |
---|
4 | # Description |
---|
5 | |
---|
6 | OpenLayers is a suite of module to help integrate the |
---|
7 | OpenLayers Javascript library within Drupal. |
---|
8 | |
---|
9 | # Requirements |
---|
10 | |
---|
11 | OpenLayers Requires |
---|
12 | |
---|
13 | * CTools: http://drupal.org/project/ctools |
---|
14 | |
---|
15 | Sub-modules require |
---|
16 | |
---|
17 | * OpenLayers Views requires Views: http://drupal.org/project/views |
---|
18 | * OpenLayers CCK requires CCK: http://drupal.org/project/cck |
---|
19 | |
---|
20 | OpenLayers can use Features to package maps into modules |
---|
21 | |
---|
22 | * Features: http://drupal.org/project/features |
---|
23 | |
---|
24 | # Sub-Modules |
---|
25 | |
---|
26 | You'll most likely want to enable OpenLayers UI and OpenLayers Views modules for typical uses of OpenLayers. |
---|
27 | |
---|
28 | * OpenLayers UI - Creates a user interface to make map |
---|
29 | arrays which can be used in various places |
---|
30 | * CCK - Allows integration with CCK so that geo data |
---|
31 | can be inputted via a map |
---|
32 | * Views - Allows data to be displayed on a map |
---|
33 | via Views |
---|
34 | * Filters - Creates a filter to replace |
---|
35 | [openlayers preset_name] with a map. |
---|
36 | |
---|
37 | # Basic Concepts |
---|
38 | |
---|
39 | ## Presets |
---|
40 | |
---|
41 | An OpenLayers map in Drupal is a combination of decisions about which |
---|
42 | layers to show, what styles to apply, the minimum and maximum zoom levels, |
---|
43 | and how the user can interact with the map. A map preset object is where |
---|
44 | the options for these settings are combined and stored. Presets can be |
---|
45 | rendered through OpenLayers views of the type "OpenLayers Map," through |
---|
46 | filters provided by the OpenLayers Filters module, or directly in your |
---|
47 | modules using the api function openlayers_render_map() |
---|
48 | |
---|
49 | ## Layers |
---|
50 | |
---|
51 | OpenLayers allows for the display of a variety of raster and vector data on |
---|
52 | maps. These are divided into two categories: basemaps and overlays. |
---|
53 | Basemaps, like those from OpenStreetMap or Google Maps, provide a background |
---|
54 | for your data. Overlays can be data from OpenLayers data views, KML layers, |
---|
55 | or other types of data from external sources. |
---|
56 | |
---|
57 | For more information on layer types, see docs/LAYER_TYPES.txt |
---|
58 | |
---|
59 | ## Styles |
---|
60 | |
---|
61 | The OpenLayers module currently allows users to define custom styles for |
---|
62 | vector overlays. The primary use-case here will be data from OpenLayers |
---|
63 | data views but this could also include KML files. Styles define things like |
---|
64 | stroke width, background and outline colors, and point size and allow the |
---|
65 | use of icons if desired. They must be associated with layers on a per- |
---|
66 | preset basis. |
---|
67 | |
---|
68 | ## Behaviors |
---|
69 | |
---|
70 | Behaviors can be enabled on map presets to control how users interact with |
---|
71 | the map. Examples of behaviors include navigation, which, when enabled, |
---|
72 | allows users to zoom and pan, and Layer Switcher, which provides a UI that |
---|
73 | allows users to toggle on and off the layers available on the map. |
---|
74 | |
---|
75 | ## OpenLayers Views |
---|
76 | |
---|
77 | OpenLayers views come in two varieties. The first is a display type called |
---|
78 | OpenLayers Data. This is what allows users to control which pieces of |
---|
79 | content show up on the map and in what manner. Each OpenLayers data view |
---|
80 | provides a layer that can be added to maps when configuring a preset. The |
---|
81 | second is a style called OpenLayers Map that can be applied to pages, |
---|
82 | blocks, attachments, and so on and give users an easy way of rendering |
---|
83 | presets. |
---|
84 | |
---|
85 | # Installation |
---|
86 | |
---|
87 | 1. Normal Drupal module installation |
---|
88 | |
---|
89 | 2. Set OpenLayers Source at: admin/build/openlayers |
---|
90 | It is suggested to download the library and use it locally for performance. |
---|
91 | |
---|
92 | 3. A tutorial |
---|
93 | |
---|
94 | |
---|
95 | # Documentation |
---|
96 | |
---|
97 | More documentation is available in the docs/ directory of this module: |
---|
98 | |
---|
99 | * CUSTOMIZATION.txt: a cookbook for common customizations users might want |
---|
100 | to make for performance and tweaking |
---|
101 | |
---|
102 | * API.txt: a technical description of the main map-generating API |
---|
103 | |
---|
104 | * LAYER_TYPES.txt: a technical description of how layer types work and |
---|
105 | guide for implementation of new layer types |
---|
106 | |
---|
107 | * KML.txt: an explanation of how KML support works in OpenLayers |
---|
108 | |
---|
109 | * JAVASCRIPT.txt: a technical explanation of how the Javascript included |
---|
110 | in the OpenLayers module (not the code in the actual OpenLayers library) |
---|
111 | operates |
---|
112 | |
---|
113 | A [tutorial is available on Drupal.org](http://drupal.org/node/627816) |
---|
114 | |
---|
115 | # Authors/Credits |
---|
116 | |
---|
117 | * [zzolo](http://drupal.org/user/147331) |
---|
118 | * [phayes](http://drupal.org/user/47098) |
---|
119 | * [tmcw](http://drupal.org/user/12664) |
---|
120 | * [brynbellomy](http://drupal.org/user/537416) |
---|
121 | * [bdragon](http://drupal.org/user/53081) |
---|
122 | * [OpenLayers monster by Saman Bemel Benrud](http://www.flickr.com/photos/samanpwbb/) |
---|
123 | * [strk](http://drupal.org/user/781486) |
---|