├── .gitignore
├── CHANGELOG.md
├── LICENSE.txt
├── README.md
├── doc
├── DynamicMeasure
│ ├── all
│ │ ├── _config
│ │ │ ├── Languages.txt
│ │ │ ├── Menu.txt
│ │ │ └── Topics.txt
│ │ ├── files
│ │ │ └── DynamicMeasure-js.html
│ │ ├── index.html
│ │ ├── javascript
│ │ │ ├── main.js
│ │ │ ├── prettify.js
│ │ │ └── searchdata.js
│ │ ├── search
│ │ │ └── NoResults.html
│ │ └── styles
│ │ │ ├── 1.css
│ │ │ ├── 2.css
│ │ │ └── main.css
│ ├── api
│ │ ├── _config
│ │ │ ├── Languages.txt
│ │ │ ├── Menu.txt
│ │ │ └── Topics.txt
│ │ ├── files
│ │ │ └── DynamicMeasure-js.html
│ │ ├── index.html
│ │ ├── javascript
│ │ │ ├── main.js
│ │ │ ├── prettify.js
│ │ │ └── searchdata.js
│ │ ├── search
│ │ │ └── NoResults.html
│ │ └── styles
│ │ │ ├── 1.css
│ │ │ ├── 2.css
│ │ │ └── main.css
│ └── index.html
└── _scripts
│ ├── documentation.cmd
│ ├── documentation.sh
│ └── jorix.css
├── examples
├── measure-and-draw.html
├── measure-and-draw.js
├── measure-and-keep.html
├── measure-and-keep.js
├── measure-dynamic-dev.html
├── measure-dynamic.html
└── measure-dynamic.js
└── lib
└── OpenLayers
└── Control
└── DynamicMeasure.js
/.gitignore:
--------------------------------------------------------------------------------
1 | /tools
2 | /build
3 | /doc/_scripts/NaturalDocs.bat
4 | /doc/DynamicMeasure/all/_config/Data
5 | /doc/DynamicMeasure/api/_config/Data
6 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | Changelog
2 | =========
3 |
4 | Development code that is considered stable in the is in the *gh-pages* branch (note that *master* branch does not exist)
5 |
6 |
7 | On development
8 | --------------
9 |
10 | (open for suggestions)
11 |
12 |
13 | [v1.2.2](https://github.com/jorix/OL-DynamicMeasure/tree/v1.2.2)
14 | ----------------------------------------------------------------
15 |
16 | #### Improvements
17 | * Allows persistent annotations after measurement ([pull #9](https://github.com/jorix/OL-DynamicMeasure/pull/9))
18 |
19 | #### Bugs
20 | * Fix: Overriding labels problem ([issue #7](https://github.com/jorix/OL-DynamicMeasure/issues/7))
21 | * Fix problems in examples.
22 |
23 |
24 | [v1.2.1](https://github.com/jorix/OL-DynamicMeasure/tree/v1.2.1)
25 | ----------------------------------------------------------------
26 |
27 | #### Bugs
28 | * When the map is panned elements (labels or lines) may not be displayed ([issue #4](https://github.com/jorix/OL-DynamicMeasure/pull/4))
29 |
30 |
31 | [v1.2.0](https://github.com/jorix/OL-DynamicMeasure/tree/v1.2.0)
32 | ----------------------------------------------------------------
33 |
34 | #### Improvements
35 | * Show bearing/heading of the segments.
36 | * Allows customize label positions.
37 |
38 |
39 | [v1.1.0](https://github.com/jorix/OL-DynamicMeasure/tree/v1.1.0)
40 | ----------------------------------------------------------------
41 |
42 | #### Improvements
43 | * Add `maxSegments` option and set default to 1.
44 | * Allows measure and draw. Added `drawingLayer` and `multi` options.
45 |
46 | #### Bugs
47 | * Fix a mistake on a example to show and hide measurements in *measure-dynamic.html*.
48 |
49 |
50 | [v1.0.0](https://github.com/jorix/OL-DynamicMeasure/tree/v1.0.0)
51 | ----------------------------------------------------------------
52 |
53 | #### Improvements
54 | * Allows to use functions `undo` & `redo` of drawing handlers.
55 |
56 |
57 | [v0.9.0](https://github.com/jorix/OL-DynamicMeasure/tree/v1.0.0)
58 | ----------------------------------------------------------------
59 |
60 | #### Improvements
61 | * Make `DynamicMeasure` a control.
62 | * Display areas measurement (in the center of the polygon)
63 |
64 | #### Bugs
65 | * Fix issue #1 on deactivate method.
66 |
67 |
68 | [v0.1.0](https://github.com/jorix/OL-DynamicMeasure/tree/v0.1.0)
69 | ----------------------------------------------------------------
70 |
71 | * Initial code, but is not a control.
72 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2018 Xavier Mamano, http://github.com/jorix/OL-DynamicMeasure
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Control for OpenLayers to measure and shows measurements at the cursor
2 | ======================================================================
3 |
4 | Based on `OpenLayers.Control.Measure`, the **DynamicMeasure** control shows
5 | measurements on labels that follow the cursor. This avoids having to worry
6 | about preparing a DOM item to display measurements.
7 |
8 | The control also has preset styles to show lines and labels, so the only thing
9 | to do is add it to the map.
10 |
11 | Control allows displaying lengths and headings of the segments that form a polyline or a polygon.
12 |
13 | Examples:
14 | ---------
15 | * [measure-dynamic.html](http://jorix.github.com/OL-DynamicMeasure/examples/measure-dynamic.html) (adapted from "measure.html" OpenLayers example)
16 |
17 | Operation:
18 | ---------
19 |
20 | Example:
21 |
22 | ```javascript
23 | ...
24 | // to mesure length
25 | var cMeasure = new OpenLayers.Control.DynamicMeasure(OpenLayers.Handler.Path);
26 | map.addControl(cMeasure);
27 | ...
28 | // ... and to start measuring
29 | cMeasure.activate();
30 | ...
31 | // ... and to stop it
32 | cMeasure.deactivate();
33 | ...
34 | ```
35 |
36 | This control is now adapted to handle the methods *undo* *redo* and *cancel* of drawing handlers.
37 |
38 | See the example [measure-dynamic-dev.html](http://jorix.github.com/OL-DynamicMeasure/examples/measure-dynamic-dev.html) (allows choose whether to use the patch posted on [OL-Ragbag](https://github.com/jorix/OL-Ragbag/blob/gh-pages/README.md#the-components))
39 |
40 | The control can use it as a `DrawFeature` control, see example [measure-and-draw.html](http://jorix.github.com/OL-DynamicMeasure/examples/measure-and-draw.html)
41 |
42 | Measure annotations are shown for the current measurement by default. They can be keeped for all measures using the `keep` property, see example [measure-and-keep.html](http://jorix.github.com/OL-DynamicMeasure/examples/measure-and-keep.html)
43 |
44 | Documentation:
45 | --------------
46 | * [API for users](http://jorix.github.com/OL-DynamicMeasure/doc/DynamicMeasure/api)
47 | * For developers
48 | * [all `DynamicMeasure` elements](http://jorix.github.com/OL-DynamicMeasure/doc/DynamicMeasure/all)
49 |
50 | Compatibility with OpenLayers releases:
51 | ---------------------------------------
52 | The `DynamicMeasure` control works correctly with release 2.11 or higher
53 | including the development version.
54 |
55 | Background
56 | ----------
57 | According [**Yus's question in DEV**](http://osgeo-org.1803224.n2.nabble.com/Adding-Segment-Length-to-Path-tc7029815.html)
58 | some adjustments are made to solve some problems:
59 | labels do not remain at the end of measure,
60 | using the freehand the map is dirtied by the labels,
61 | layer of the labels (`vlayer`) should be on top of the drawing layer,
62 | allow use of immediate measure (new in 2.11)
63 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/all/_config/Languages.txt:
--------------------------------------------------------------------------------
1 | Format: 1.52
2 |
3 | # This is the Natural Docs languages file for this project. If you change
4 | # anything here, it will apply to THIS PROJECT ONLY. If you'd like to change
5 | # something for all your projects, edit the Languages.txt in Natural Docs'
6 | # Config directory instead.
7 |
8 |
9 | # You can prevent certain file extensions from being scanned like this:
10 | # Ignore Extensions: [extension] [extension] ...
11 |
12 |
13 | #-------------------------------------------------------------------------------
14 | # SYNTAX:
15 | #
16 | # Unlike other Natural Docs configuration files, in this file all comments
17 | # MUST be alone on a line. Some languages deal with the # character, so you
18 | # cannot put comments on the same line as content.
19 | #
20 | # Also, all lists are separated with spaces, not commas, again because some
21 | # languages may need to use them.
22 | #
23 | # Language: [name]
24 | # Alter Language: [name]
25 | # Defines a new language or alters an existing one. Its name can use any
26 | # characters. If any of the properties below have an add/replace form, you
27 | # must use that when using Alter Language.
28 | #
29 | # The language Shebang Script is special. It's entry is only used for
30 | # extensions, and files with those extensions have their shebang (#!) lines
31 | # read to determine the real language of the file. Extensionless files are
32 | # always treated this way.
33 | #
34 | # The language Text File is also special. It's treated as one big comment
35 | # so you can put Natural Docs content in them without special symbols. Also,
36 | # if you don't specify a package separator, ignored prefixes, or enum value
37 | # behavior, it will copy those settings from the language that is used most
38 | # in the source tree.
39 | #
40 | # Extensions: [extension] [extension] ...
41 | # [Add/Replace] Extensions: [extension] [extension] ...
42 | # Defines the file extensions of the language's source files. You can
43 | # redefine extensions found in the main languages file. You can use * to
44 | # mean any undefined extension.
45 | #
46 | # Shebang Strings: [string] [string] ...
47 | # [Add/Replace] Shebang Strings: [string] [string] ...
48 | # Defines a list of strings that can appear in the shebang (#!) line to
49 | # designate that it's part of the language. You can redefine strings found
50 | # in the main languages file.
51 | #
52 | # Ignore Prefixes in Index: [prefix] [prefix] ...
53 | # [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ...
54 | #
55 | # Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ...
56 | # [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ...
57 | # Specifies prefixes that should be ignored when sorting symbols in an
58 | # index. Can be specified in general or for a specific topic type.
59 | #
60 | #------------------------------------------------------------------------------
61 | # For basic language support only:
62 | #
63 | # Line Comments: [symbol] [symbol] ...
64 | # Defines a space-separated list of symbols that are used for line comments,
65 | # if any.
66 | #
67 | # Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ...
68 | # Defines a space-separated list of symbol pairs that are used for block
69 | # comments, if any.
70 | #
71 | # Package Separator: [symbol]
72 | # Defines the default package separator symbol. The default is a dot.
73 | #
74 | # [Topic Type] Prototype Enders: [symbol] [symbol] ...
75 | # When defined, Natural Docs will attempt to get a prototype from the code
76 | # immediately following the topic type. It stops when it reaches one of
77 | # these symbols. Use \n for line breaks.
78 | #
79 | # Line Extender: [symbol]
80 | # Defines the symbol that allows a prototype to span multiple lines if
81 | # normally a line break would end it.
82 | #
83 | # Enum Values: [global|under type|under parent]
84 | # Defines how enum values are referenced. The default is global.
85 | # global - Values are always global, referenced as 'value'.
86 | # under type - Values are under the enum type, referenced as
87 | # 'package.enum.value'.
88 | # under parent - Values are under the enum's parent, referenced as
89 | # 'package.value'.
90 | #
91 | # Perl Package: [perl package]
92 | # Specifies the Perl package used to fine-tune the language behavior in ways
93 | # too complex to do in this file.
94 | #
95 | #------------------------------------------------------------------------------
96 | # For full language support only:
97 | #
98 | # Full Language Support: [perl package]
99 | # Specifies the Perl package that has the parsing routines necessary for full
100 | # language support.
101 | #
102 | #-------------------------------------------------------------------------------
103 |
104 | # The following languages are defined in the main file, if you'd like to alter
105 | # them:
106 | #
107 | # Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python,
108 | # PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile,
109 | # ActionScript, ColdFusion, R, Fortran
110 |
111 | # If you add a language that you think would be useful to other developers
112 | # and should be included in Natural Docs by default, please e-mail it to
113 | # languages [at] naturaldocs [dot] org.
114 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/all/_config/Menu.txt:
--------------------------------------------------------------------------------
1 | Format: 1.52
2 |
3 |
4 | Title: Dynamic Measure
5 | SubTitle: Compatible with OpenLayers from 2.11 to 2.13 & dev
6 |
7 | Footer: View on github.com/jorixView on GitHub
8 |
9 | # You can add a timestamp to your documentation like one of these:
10 | # Timestamp: Generated on month day, year
11 | # Timestamp: Updated mm/dd/yyyy
12 | # Timestamp: Last updated mon day
13 | #
14 | # m - One or two digit month. January is "1"
15 | # mm - Always two digit month. January is "01"
16 | # mon - Short month word. January is "Jan"
17 | # month - Long month word. January is "January"
18 | # d - One or two digit day. 1 is "1"
19 | # dd - Always two digit day. 1 is "01"
20 | # day - Day with letter extension. 1 is "1st"
21 | # yy - Two digit year. 2006 is "06"
22 | # yyyy - Four digit year. 2006 is "2006"
23 | # year - Four digit year. 2006 is "2006"
24 |
25 | # These are indexes you deleted, so Natural Docs will not add them again
26 | # unless you remove them from this line.
27 |
28 | Don't Index: Classes, Constructor, Files, Functions, General, Constants, Properties
29 |
30 |
31 | # --------------------------------------------------------------------------
32 | #
33 | # Cut and paste the lines below to change the order in which your files
34 | # appear on the menu. Don't worry about adding or removing files, Natural
35 | # Docs will take care of that.
36 | #
37 | # You can further organize the menu by grouping the entries. Add a
38 | # "Group: [name] {" line to start a group, and add a "}" to end it.
39 | #
40 | # You can add text and web links to the menu by adding "Text: [text]" and
41 | # "Link: [name] ([URL])" lines, respectively.
42 | #
43 | # The formatting and comments are auto-generated, so don't worry about
44 | # neatness when editing the file. Natural Docs will clean it up the next
45 | # time it is run. When working with groups, just deal with the braces and
46 | # forget about the indentation and comments.
47 | #
48 | # --------------------------------------------------------------------------
49 |
50 |
51 | File: DynamicMeasure (DynamicMeasure.js)
52 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/all/_config/Topics.txt:
--------------------------------------------------------------------------------
1 | Format: 1.52
2 |
3 | # This is the Natural Docs topics file for this project. If you change anything
4 | # here, it will apply to THIS PROJECT ONLY. If you'd like to change something
5 | # for all your projects, edit the Topics.txt in Natural Docs' Config directory
6 | # instead.
7 |
8 |
9 | # If you'd like to prevent keywords from being recognized by Natural Docs, you
10 | # can do it like this:
11 | # Ignore Keywords: [keyword], [keyword], ...
12 | #
13 | # Or you can use the list syntax like how they are defined:
14 | # Ignore Keywords:
15 | # [keyword]
16 | # [keyword], [plural keyword]
17 | # ...
18 |
19 |
20 | #-------------------------------------------------------------------------------
21 | # SYNTAX:
22 | #
23 | # Topic Type: [name]
24 | # Alter Topic Type: [name]
25 | # Creates a new topic type or alters one from the main file. Each type gets
26 | # its own index and behavior settings. Its name can have letters, numbers,
27 | # spaces, and these charaters: - / . '
28 | #
29 | # Plural: [name]
30 | # Sets the plural name of the topic type, if different.
31 | #
32 | # Keywords:
33 | # [keyword]
34 | # [keyword], [plural keyword]
35 | # ...
36 | # Defines or adds to the list of keywords for the topic type. They may only
37 | # contain letters, numbers, and spaces and are not case sensitive. Plural
38 | # keywords are used for list topics. You can redefine keywords found in the
39 | # main topics file.
40 | #
41 | # Index: [yes|no]
42 | # Whether the topics get their own index. Defaults to yes. Everything is
43 | # included in the general index regardless of this setting.
44 | #
45 | # Scope: [normal|start|end|always global]
46 | # How the topics affects scope. Defaults to normal.
47 | # normal - Topics stay within the current scope.
48 | # start - Topics start a new scope for all the topics beneath it,
49 | # like class topics.
50 | # end - Topics reset the scope back to global for all the topics
51 | # beneath it.
52 | # always global - Topics are defined as global, but do not change the scope
53 | # for any other topics.
54 | #
55 | # Class Hierarchy: [yes|no]
56 | # Whether the topics are part of the class hierarchy. Defaults to no.
57 | #
58 | # Page Title If First: [yes|no]
59 | # Whether the topic's title becomes the page title if it's the first one in
60 | # a file. Defaults to no.
61 | #
62 | # Break Lists: [yes|no]
63 | # Whether list topics should be broken into individual topics in the output.
64 | # Defaults to no.
65 | #
66 | # Can Group With: [type], [type], ...
67 | # Defines a list of topic types that this one can possibly be grouped with.
68 | # Defaults to none.
69 | #-------------------------------------------------------------------------------
70 |
71 | # The following topics are defined in the main file, if you'd like to alter
72 | # their behavior or add keywords:
73 | #
74 | # Generic, Class, Interface, Section, File, Group, Function, Variable,
75 | # Property, Type, Constant, Enumeration, Event, Delegate, Macro,
76 | # Database, Database Table, Database View, Database Index, Database
77 | # Cursor, Database Trigger, Cookie, Build Target
78 |
79 | # If you add something that you think would be useful to other developers
80 | # and should be included in Natural Docs by default, please e-mail it to
81 | # topics [at] naturaldocs [dot] org.
82 |
83 |
84 | Topic Type: Constructor
85 |
86 | Class Hierarchy: Yes
87 | Keywords:
88 | constructor
89 | initialize
90 |
91 |
92 | Alter Topic Type: Function
93 |
94 | Add Keywords:
95 | apimethod
96 | apifunction
97 |
98 |
99 | Alter Topic Type: Property
100 |
101 | Add Keywords:
102 | apiproperty
103 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/all/files/DynamicMeasure-js.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{Object} Alterations of the default styles of the points lines poligons and labels text, could use keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea”.
{Object} Alterations of the default position of the labels, could use keys: “labelSegments” & “labelHeading”, with values “start” “middle” and “end” refered of the current segment; and keys: “labelLength” & “labelArea” with additional values “center” (of the feature) and “initial” (initial point of the feature) and also mentioned previus values.
Contains the keys: “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a strings with values ‘start’, ‘middle’ and ‘end’ allowed for all keys (refered of last segment) and ‘center’ and ‘initial’ (refered of the measured feature and only allowed for “labelLength” and “labelArea” keys)
15 |
16 |
Properties
17 |
18 |
accuracy
{Integer} Digits measurement accuracy, default is 5.
19 |
20 |
persist
{Boolean} Keep the temporary measurement after the measurement is complete. The measurement will persist until a new measurement is started, the control is deactivated, or <cancel> is called. Default is true.
21 |
22 |
styles
{Object} Alterations of the default styles of the points lines poligons and labels text, could use keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea”. Default is OpenLayers.Control.DynamicMeasure.styles.
23 |
24 |
positions
{Object} Alterations of the default position of the labels, could use keys: “labelSegments” & “labelHeading”, with values “start” “middle” and “end” refered of the current segment; and keys: “labelLength” & “labelArea” with additional values “center” (of the feature) and “initial” (initial point of the feature) and also mentioned previus values. Default is OpenLayers.Control.DynamicMeasure.positions.
25 |
26 |
maxSegments
{Integer|Null} Maximum number of visible segments measures, default is 1.
To avoid soiling the track is desirable to reduce the number of visible segments.
27 |
28 |
maxHeadings
{Integer|Null} Maximum number of visible headings measures, default is 1.
To avoid soiling the track is desirable to reduce the number of visible segments.
29 |
30 |
layerSegmentsOptions
{Object} Any optional properties to be set on the layer of layerSegments of the lengths of the segments. If set to null the layer does not act.
If `styleMap` options is set then the key “labelSegments” of the `styles` option is ignored.
31 |
32 |
layerHeadingOptions
{Object} Any optional properties to be set on the layer of <layerHeading> of the angle of the segments. If set to null the layer does not act. Default is null, set to {} to use a <layerHeading> to show headings.
If `styleMap` options is set then the key “labelHeading” of the `styles` option is ignored.
33 |
34 |
layerLengthOptions
{Object} Any optional properties to be set on the layer of layerLength of the total length. If set to null the layer does not act.
If `styleMap` option is set then the key “labelLength” of the `styles` option is ignored.
35 |
36 |
layerAreaOptions
{Object} Any optional properties to be set on the layer of layerArea of the total area. If set to null the layer does not act.
If `styleMap` is set then the key “labelArea” of the `styles` option is ignored.
37 |
38 |
drawingLayer
{<OpenLayers.Layer.Vector>} Drawing layer to store the drawing when finished.
39 |
40 |
multi
{Boolean} Cast features to multi-part geometries before passing to the drawing layer, only used if declared a drawingLayer. Default is false.
41 |
42 |
keep
{Boolean} Keep annotations for every measures.
43 |
44 |
layerSegments
{<OpenLayers.Layer.Vector>} The temporary drawing layer to show the length of the segments.
45 |
46 |
layerLength
{<OpenLayers.Layer.Vector>} The temporary drawing layer to show total length.
47 |
48 |
layerArea
{<OpenLayers.Layer.Vector>} The temporary drawing layer to show total area.
49 |
50 |
layerSegmentsKeep
{<OpenLayers.Layer.Vector>} The layer keep a copy of the length of every segments measured since tool activation.
51 |
52 |
layersLengthKeep
{<OpenLayers.Layer.Vector>} The layer keep a copy of the length of every polyline/poly measured since tool activation.
53 |
54 |
layerAreaKeep
{<OpenLayers.Layer.Vector>} The layer keep a copy of the area of every polygon
55 |
56 |
dynamicObj
{Object} Internal use.
57 |
58 |
isArea
{Boolean} Internal use.
59 |
60 |
Constructor
61 |
62 |
OpenLayers.Control.Measure
Parameters
handler
{<OpenLayers.Handler>}
options
{Object}
Valid options
accuracy
{Integer} Digits measurement accuracy, default is 5.
styles
{Object} Alterations of the default styles of the points lines poligons and labels text, could use keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelLength”, “labelArea”.
positions
{Object} Alterations of the default position of the labels.
handlerOptions
{Object} Used to set non-default properties on the control’s handler. If `layerOptions[“styleMap”]` is set then the keys: “Point”, “Line” and “Polygon” of the `styles` option are ignored.
layerSegmentsOptions
{Object} Any optional properties to be set on the layer of layerSegments of the lengths of the segments. If `styleMap` is set then the key “labelSegments” of the `styles` option is ignored. If set to null the layer does not act.
layerLengthOptions
{Object} Any optional properties to be set on the layer of layerLength of the total length. If `styleMap` is set then the key “labelLength” of the `styles` option is ignored. If set to null the layer does not act.
layerAreaOptions
{Object} Any optional properties to be set on the layer of layerArea of the total area. If `styleMap` is set then the key “labelArea” of the `styles` option is ignored. If set to null the layer does not act.
layerHeadingOptions
{Object} Any optional properties to be set on the layer of <layerHeading> of the angle of the segments. If `styleMap` is set then the key “labelHeading” of the `styles` option is ignored. If set to null the layer does not act.
drawingLayer
{<OpenLayers.Layer.Vector>} Optional drawing layer to store the drawing when finished.
multi
{Boolean} Cast features to multi-part geometries before passing to the drawing layer
keep
{Boolean} Keep annotations for every measures.
63 |
64 |
Functions
65 |
66 |
destroy
destroy: function()
67 |
68 |
draw
draw: function()
This control does not have HTML component, so this method should be empty.
69 |
70 |
activate
activate: function()
71 |
72 |
deactivate
deactivate: function()
73 |
74 |
emptyKeeped
emptyKeeped: function ()
Remove annotations from layers layerSegmentsKeep, layerLengthKeep, layerAreaKeep.
75 |
76 |
setImmediate
setImmediate: function(
immediate
)
Sets the <immediate> property. Changes the activity of immediate measurement.
77 |
78 |
callbackCreate
callbackCreate: function()
79 |
80 |
callbackCancel
callbackCancel: function()
81 |
82 |
callbackDone
callbackDone: function(
geometry
)
Called when the measurement sketch is done.
Parameters
geometry
{<OpenLayers.Geometry>}
83 |
84 |
drawFeature
drawFeature: function(
geometry
)
85 |
86 |
copyAnnotations
copyAnnotations: function()
87 |
88 |
callbackCancel
89 |
90 |
callbackPoint
callbackPoint: function(
point,
geometry
)
91 |
92 |
callbackUndo
callbackUndo: function(
point,
feature
)
93 |
94 |
callbackRedo
callbackRedo: function(
point,
feature
)
95 |
96 |
callbackModify
callbackModify: function(
point,
feature,
drawing
)
97 |
98 |
showLabelSegment
showLabelSegment: function(
labelsNumber,
fromIndex,
_points
)
Parameters
labelsNumber- {Integer} Number of the labels to be on the label layer. fromIndex - {Integer} Index of the last point on the measured feature. points - Array({<OpenLayers.Geometry.Point>})
Returns
{Boolean}
99 |
100 |
showLabel
showLabel: function(
layer,
labelsNumber,
fromIndex,
measure,
xy,
maxSegments
)
Parameters
layer
{<OpenLayers.Layer.Vector>} Layer of the labels. labelsNumber- {Integer} Number of the labels to be on the label layer.
fromIndex
{Integer} Index of the last point on the measured feature.
measure
Array({Float|String}) Measure provided by OL Measure control.
points
Array({Fload}) Array of x and y of the point to draw the label.
maxSegments
{Integer|Null} Maximum number of visible segments measures
Returns
{Boolean}
101 |
102 |
setMesureAttributes
setMesureAttributes: function(
attributes,
measure
)
Format measure[0] with digits of accuracy. Could internationalize the format customizing <OpenLayers.Number.thousandsSeparator> and <OpenLayers.Number.decimalSeparator>
Parameters
attributes
{object} Target attributes.
measure
Array({*})
103 |
104 |
Constants
105 |
106 |
OpenLayers.Control.DynamicMeasure.styles
Contains the keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a objects with style keys.
107 |
108 |
OpenLayers.Control.DynamicMeasure.positions
Contains the keys: “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a strings with values ‘start’, ‘middle’ and ‘end’ allowed for all keys (refered of last segment) and ‘center’ and ‘initial’ (refered of the measured feature and only allowed for “labelLength” and “labelArea” keys)
Compatible with OpenLayers from 2.11 to 2.13 & dev
DynamicMeasure
117 |
118 |
119 |
120 |
121 |
{OpenLayers.Layer.Vector} The temporary drawing layer to show the length of the segments.
{OpenLayers.Layer.Vector} The temporary drawing layer to show total length.
{OpenLayers.Layer.Vector} The temporary drawing layer to show total area.
{OpenLayers.Layer.Vector} Drawing layer to store the drawing when finished.
destroy: function()
draw: function()
This control does not have HTML component, so this method should be empty.
activate: function()
deactivate: function()
emptyKeeped: function ()
Remove annotations from layers layerSegmentsKeep, layerLengthKeep, layerAreaKeep.
setImmediate: function(
immediate
)
Sets the immediate property.
callbackCreate: function()
callbackCancel: function()
callbackDone: function(
geometry
)
Called when the measurement sketch is done.
drawFeature: function(
geometry
)
copyAnnotations: function()
callbackPoint: function(
point,
geometry
)
callbackUndo: function(
point,
feature
)
callbackRedo: function(
point,
feature
)
callbackModify: function(
point,
feature,
drawing
)
showLabelSegment: function(
labelsNumber,
fromIndex,
_points
)
labelsNumber- {Integer} Number of the labels to be on the label layer.
showLabel: function(
layer,
labelsNumber,
fromIndex,
measure,
xy,
maxSegments
)
setMesureAttributes: function(
attributes,
measure
)
Format measure[0] with digits of accuracy.
{Integer} Digits measurement accuracy, default is 5.
Contains the keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a objects with style keys.
Contains the keys: “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a strings with values ‘start’, ‘middle’ and ‘end’ allowed for all keys (refered of last segment) and ‘center’ and ‘initial’ (refered of the measured feature and only allowed for “labelLength” and “labelArea” keys)
--------------------------------------------------------------------------------
/doc/DynamicMeasure/all/styles/1.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jorix/OL-DynamicMeasure/8e95983d7c2ee05e7db2affd0e091b743ef3e8d1/doc/DynamicMeasure/all/styles/1.css
--------------------------------------------------------------------------------
/doc/DynamicMeasure/all/styles/2.css:
--------------------------------------------------------------------------------
1 | p {
2 | text-indent: 0; margin-bottom: 1em;
3 | }
4 |
5 | .MGroup {
6 | font-variant: normal;
7 | margin: 0.4em 0 0em 10px
8 | }
9 |
10 | .MTitle {
11 | font-variant: normal;
12 | }
13 |
14 | .CGroup .CTitle {
15 | font-variant: normal;
16 | }
17 |
18 | .SGroup .SEntry {
19 | font-variant: normal;
20 | }
21 |
22 | .CClass .CTopic h2.CTitle,
23 | #MainTopic .CTitle {
24 | background-color: #ddd;
25 | color: #025;
26 | border-radius: 16px;
27 | border-width:0;
28 | margin: 5px;
29 | margin: 0 10px 5px 10px;
30 | box-shadow: 0 0 10px rgba(0,0,0,0.6);
31 | }
32 | #MainTopic .CTitle {
33 | padding-right: 150px; /* used by #forkme_banner */
34 | border-top-right-radius: 0;
35 | border-top-left-radius: 0;
36 | }
37 | #forkme_banner {
38 | display: block;
39 | position: absolute;
40 | top: 3px; right: 13px;
41 | z-index: 10;
42 | padding: 5px 5px 5px 36px;
43 | color: #fff !important;
44 | background: url('http://github.com/themes/slate/images/blacktocat.png') #0090ff no-repeat 3px 50%;
45 | box-shadow: 0 0 10px rgba(0,0,0,0.5);
46 | border-radius: 16px;
47 | text-decoration: none;
48 | font-family: 'Myriad Pro', Calibri, Helvetica, Arial, sans-serif;
49 | font-size: 16px;
50 | line-height: 24px;
51 | font-weight: bold;
52 | }
53 | a#forkme_banner:hover,
54 | a#forkme_banner:focus {
55 | background: url('http://github.com/themes/slate/images/blacktocat.png') #000000 no-repeat 3px 50%;
56 | }
57 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/all/styles/main.css:
--------------------------------------------------------------------------------
1 | @import URL("1.css");
2 | @import URL("2.css");
3 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/api/_config/Languages.txt:
--------------------------------------------------------------------------------
1 | Format: 1.52
2 |
3 | # This is the Natural Docs languages file for this project. If you change
4 | # anything here, it will apply to THIS PROJECT ONLY. If you'd like to change
5 | # something for all your projects, edit the Languages.txt in Natural Docs'
6 | # Config directory instead.
7 |
8 |
9 | # You can prevent certain file extensions from being scanned like this:
10 | # Ignore Extensions: [extension] [extension] ...
11 |
12 |
13 | #-------------------------------------------------------------------------------
14 | # SYNTAX:
15 | #
16 | # Unlike other Natural Docs configuration files, in this file all comments
17 | # MUST be alone on a line. Some languages deal with the # character, so you
18 | # cannot put comments on the same line as content.
19 | #
20 | # Also, all lists are separated with spaces, not commas, again because some
21 | # languages may need to use them.
22 | #
23 | # Language: [name]
24 | # Alter Language: [name]
25 | # Defines a new language or alters an existing one. Its name can use any
26 | # characters. If any of the properties below have an add/replace form, you
27 | # must use that when using Alter Language.
28 | #
29 | # The language Shebang Script is special. It's entry is only used for
30 | # extensions, and files with those extensions have their shebang (#!) lines
31 | # read to determine the real language of the file. Extensionless files are
32 | # always treated this way.
33 | #
34 | # The language Text File is also special. It's treated as one big comment
35 | # so you can put Natural Docs content in them without special symbols. Also,
36 | # if you don't specify a package separator, ignored prefixes, or enum value
37 | # behavior, it will copy those settings from the language that is used most
38 | # in the source tree.
39 | #
40 | # Extensions: [extension] [extension] ...
41 | # [Add/Replace] Extensions: [extension] [extension] ...
42 | # Defines the file extensions of the language's source files. You can
43 | # redefine extensions found in the main languages file. You can use * to
44 | # mean any undefined extension.
45 | #
46 | # Shebang Strings: [string] [string] ...
47 | # [Add/Replace] Shebang Strings: [string] [string] ...
48 | # Defines a list of strings that can appear in the shebang (#!) line to
49 | # designate that it's part of the language. You can redefine strings found
50 | # in the main languages file.
51 | #
52 | # Ignore Prefixes in Index: [prefix] [prefix] ...
53 | # [Add/Replace] Ignored Prefixes in Index: [prefix] [prefix] ...
54 | #
55 | # Ignore [Topic Type] Prefixes in Index: [prefix] [prefix] ...
56 | # [Add/Replace] Ignored [Topic Type] Prefixes in Index: [prefix] [prefix] ...
57 | # Specifies prefixes that should be ignored when sorting symbols in an
58 | # index. Can be specified in general or for a specific topic type.
59 | #
60 | #------------------------------------------------------------------------------
61 | # For basic language support only:
62 | #
63 | # Line Comments: [symbol] [symbol] ...
64 | # Defines a space-separated list of symbols that are used for line comments,
65 | # if any.
66 | #
67 | # Block Comments: [opening sym] [closing sym] [opening sym] [closing sym] ...
68 | # Defines a space-separated list of symbol pairs that are used for block
69 | # comments, if any.
70 | #
71 | # Package Separator: [symbol]
72 | # Defines the default package separator symbol. The default is a dot.
73 | #
74 | # [Topic Type] Prototype Enders: [symbol] [symbol] ...
75 | # When defined, Natural Docs will attempt to get a prototype from the code
76 | # immediately following the topic type. It stops when it reaches one of
77 | # these symbols. Use \n for line breaks.
78 | #
79 | # Line Extender: [symbol]
80 | # Defines the symbol that allows a prototype to span multiple lines if
81 | # normally a line break would end it.
82 | #
83 | # Enum Values: [global|under type|under parent]
84 | # Defines how enum values are referenced. The default is global.
85 | # global - Values are always global, referenced as 'value'.
86 | # under type - Values are under the enum type, referenced as
87 | # 'package.enum.value'.
88 | # under parent - Values are under the enum's parent, referenced as
89 | # 'package.value'.
90 | #
91 | # Perl Package: [perl package]
92 | # Specifies the Perl package used to fine-tune the language behavior in ways
93 | # too complex to do in this file.
94 | #
95 | #------------------------------------------------------------------------------
96 | # For full language support only:
97 | #
98 | # Full Language Support: [perl package]
99 | # Specifies the Perl package that has the parsing routines necessary for full
100 | # language support.
101 | #
102 | #-------------------------------------------------------------------------------
103 |
104 | # The following languages are defined in the main file, if you'd like to alter
105 | # them:
106 | #
107 | # Text File, Shebang Script, C/C++, C#, Java, JavaScript, Perl, Python,
108 | # PHP, SQL, Visual Basic, Pascal, Assembly, Ada, Tcl, Ruby, Makefile,
109 | # ActionScript, ColdFusion, R, Fortran
110 |
111 | # If you add a language that you think would be useful to other developers
112 | # and should be included in Natural Docs by default, please e-mail it to
113 | # languages [at] naturaldocs [dot] org.
114 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/api/_config/Menu.txt:
--------------------------------------------------------------------------------
1 | Format: 1.52
2 |
3 |
4 | Title: Dynamic Measure
5 | SubTitle: Compatible with OpenLayers from 2.11 to 2.13 & dev
6 |
7 | Footer: View on github.com/jorixView on GitHub
8 |
9 | # You can add a timestamp to your documentation like one of these:
10 | # Timestamp: Generated on month day, year
11 | # Timestamp: Updated mm/dd/yyyy
12 | # Timestamp: Last updated mon day
13 | #
14 | # m - One or two digit month. January is "1"
15 | # mm - Always two digit month. January is "01"
16 | # mon - Short month word. January is "Jan"
17 | # month - Long month word. January is "January"
18 | # d - One or two digit day. 1 is "1"
19 | # dd - Always two digit day. 1 is "01"
20 | # day - Day with letter extension. 1 is "1st"
21 | # yy - Two digit year. 2006 is "06"
22 | # yyyy - Four digit year. 2006 is "2006"
23 | # year - Four digit year. 2006 is "2006"
24 |
25 | # These are indexes you deleted, so Natural Docs will not add them again
26 | # unless you remove them from this line.
27 |
28 | Don't Index: General, Properties, Constants, Constructor, Functions, Classes
29 |
30 |
31 | # --------------------------------------------------------------------------
32 | #
33 | # Cut and paste the lines below to change the order in which your files
34 | # appear on the menu. Don't worry about adding or removing files, Natural
35 | # Docs will take care of that.
36 | #
37 | # You can further organize the menu by grouping the entries. Add a
38 | # "Group: [name] {" line to start a group, and add a "}" to end it.
39 | #
40 | # You can add text and web links to the menu by adding "Text: [text]" and
41 | # "Link: [name] ([URL])" lines, respectively.
42 | #
43 | # The formatting and comments are auto-generated, so don't worry about
44 | # neatness when editing the file. Natural Docs will clean it up the next
45 | # time it is run. When working with groups, just deal with the braces and
46 | # forget about the indentation and comments.
47 | #
48 | # --------------------------------------------------------------------------
49 |
50 |
51 | File: DynamicMeasure (DynamicMeasure.js)
52 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/api/_config/Topics.txt:
--------------------------------------------------------------------------------
1 | Format: 1.52
2 |
3 | # This is the Natural Docs topics file for this project. If you change anything
4 | # here, it will apply to THIS PROJECT ONLY. If you'd like to change something
5 | # for all your projects, edit the Topics.txt in Natural Docs' Config directory
6 | # instead.
7 |
8 |
9 | Ignore Keywords:
10 | function, functions
11 | func, funcs
12 | procedure, procedures
13 | proc, procs
14 | routine, routines
15 | subroutine, subroutines
16 | sub, subs
17 | method, methods
18 | callback, callbacks
19 | property, properties
20 | prop, props
21 |
22 |
23 | #-------------------------------------------------------------------------------
24 | # SYNTAX:
25 | #
26 | # Topic Type: [name]
27 | # Alter Topic Type: [name]
28 | # Creates a new topic type or alters one from the main file. Each type gets
29 | # its own index and behavior settings. Its name can have letters, numbers,
30 | # spaces, and these charaters: - / . '
31 | #
32 | # Plural: [name]
33 | # Sets the plural name of the topic type, if different.
34 | #
35 | # Keywords:
36 | # [keyword]
37 | # [keyword], [plural keyword]
38 | # ...
39 | # Defines or adds to the list of keywords for the topic type. They may only
40 | # contain letters, numbers, and spaces and are not case sensitive. Plural
41 | # keywords are used for list topics. You can redefine keywords found in the
42 | # main topics file.
43 | #
44 | # Index: [yes|no]
45 | # Whether the topics get their own index. Defaults to yes. Everything is
46 | # included in the general index regardless of this setting.
47 | #
48 | # Scope: [normal|start|end|always global]
49 | # How the topics affects scope. Defaults to normal.
50 | # normal - Topics stay within the current scope.
51 | # start - Topics start a new scope for all the topics beneath it,
52 | # like class topics.
53 | # end - Topics reset the scope back to global for all the topics
54 | # beneath it.
55 | # always global - Topics are defined as global, but do not change the scope
56 | # for any other topics.
57 | #
58 | # Class Hierarchy: [yes|no]
59 | # Whether the topics are part of the class hierarchy. Defaults to no.
60 | #
61 | # Page Title If First: [yes|no]
62 | # Whether the topic's title becomes the page title if it's the first one in
63 | # a file. Defaults to no.
64 | #
65 | # Break Lists: [yes|no]
66 | # Whether list topics should be broken into individual topics in the output.
67 | # Defaults to no.
68 | #
69 | # Can Group With: [type], [type], ...
70 | # Defines a list of topic types that this one can possibly be grouped with.
71 | # Defaults to none.
72 | #-------------------------------------------------------------------------------
73 |
74 | # The following topics are defined in the main file, if you'd like to alter
75 | # their behavior or add keywords:
76 | #
77 | # Generic, Class, Interface, Section, File, Group, Function, Variable,
78 | # Property, Type, Constant, Enumeration, Event, Delegate, Macro,
79 | # Database, Database Table, Database View, Database Index, Database
80 | # Cursor, Database Trigger, Cookie, Build Target
81 |
82 | # If you add something that you think would be useful to other developers
83 | # and should be included in Natural Docs by default, please e-mail it to
84 | # topics [at] naturaldocs [dot] org.
85 |
86 |
87 | Topic Type: Constructor
88 |
89 | Class Hierarchy: Yes
90 | Keywords:
91 | constructor
92 | initialize
93 |
94 |
95 | Alter Topic Type: Function
96 |
97 | Add Keywords:
98 | apimethod
99 | apifunction
100 |
101 |
102 | Alter Topic Type: Property
103 |
104 | Add Keywords:
105 | apiproperty
106 |
--------------------------------------------------------------------------------
/doc/DynamicMeasure/api/files/DynamicMeasure-js.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | OpenLayers.Control.DynamicMeasure - Dynamic Measure
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
{Object} Alterations of the default styles of the points lines poligons and labels text, could use keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea”.
{Object} Alterations of the default position of the labels, could use keys: “labelSegments” & “labelHeading”, with values “start” “middle” and “end” refered of the current segment; and keys: “labelLength” & “labelArea” with additional values “center” (of the feature) and “initial” (initial point of the feature) and also mentioned previus values.
Contains the keys: “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a strings with values ‘start’, ‘middle’ and ‘end’ allowed for all keys (refered of last segment) and ‘center’ and ‘initial’ (refered of the measured feature and only allowed for “labelLength” and “labelArea” keys)
15 |
16 |
Properties
17 |
18 |
accuracy
{Integer} Digits measurement accuracy, default is 5.
19 |
20 |
persist
{Boolean} Keep the temporary measurement after the measurement is complete. The measurement will persist until a new measurement is started, the control is deactivated, or <cancel> is called. Default is true.
21 |
22 |
styles
{Object} Alterations of the default styles of the points lines poligons and labels text, could use keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea”. Default is OpenLayers.Control.DynamicMeasure.styles.
23 |
24 |
positions
{Object} Alterations of the default position of the labels, could use keys: “labelSegments” & “labelHeading”, with values “start” “middle” and “end” refered of the current segment; and keys: “labelLength” & “labelArea” with additional values “center” (of the feature) and “initial” (initial point of the feature) and also mentioned previus values. Default is OpenLayers.Control.DynamicMeasure.positions.
25 |
26 |
maxSegments
{Integer|Null} Maximum number of visible segments measures, default is 1.
To avoid soiling the track is desirable to reduce the number of visible segments.
27 |
28 |
maxHeadings
{Integer|Null} Maximum number of visible headings measures, default is 1.
To avoid soiling the track is desirable to reduce the number of visible segments.
29 |
30 |
layerSegmentsOptions
{Object} Any optional properties to be set on the layer of <layerSegments> of the lengths of the segments. If set to null the layer does not act.
If `styleMap` options is set then the key “labelSegments” of the `styles` option is ignored.
31 |
32 |
layerHeadingOptions
{Object} Any optional properties to be set on the layer of <layerHeading> of the angle of the segments. If set to null the layer does not act. Default is null, set to {} to use a <layerHeading> to show headings.
If `styleMap` options is set then the key “labelHeading” of the `styles` option is ignored.
33 |
34 |
layerLengthOptions
{Object} Any optional properties to be set on the layer of <layerLength> of the total length. If set to null the layer does not act.
If `styleMap` option is set then the key “labelLength” of the `styles` option is ignored.
35 |
36 |
layerAreaOptions
{Object} Any optional properties to be set on the layer of <layerArea> of the total area. If set to null the layer does not act.
If `styleMap` is set then the key “labelArea” of the `styles` option is ignored.
37 |
38 |
drawingLayer
{<OpenLayers.Layer.Vector>} Drawing layer to store the drawing when finished.
39 |
40 |
multi
{Boolean} Cast features to multi-part geometries before passing to the drawing layer, only used if declared a drawingLayer. Default is false.
41 |
42 |
keep
{Boolean} Keep annotations for every measures.
43 |
44 |
Constructor
45 |
46 |
OpenLayers.Control.Measure
Parameters
handler
{<OpenLayers.Handler>}
options
{Object}
Valid options
accuracy
{Integer} Digits measurement accuracy, default is 5.
styles
{Object} Alterations of the default styles of the points lines poligons and labels text, could use keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelLength”, “labelArea”.
positions
{Object} Alterations of the default position of the labels.
handlerOptions
{Object} Used to set non-default properties on the control’s handler. If `layerOptions[“styleMap”]` is set then the keys: “Point”, “Line” and “Polygon” of the `styles` option are ignored.
layerSegmentsOptions
{Object} Any optional properties to be set on the layer of <layerSegments> of the lengths of the segments. If `styleMap` is set then the key “labelSegments” of the `styles` option is ignored. If set to null the layer does not act.
layerLengthOptions
{Object} Any optional properties to be set on the layer of <layerLength> of the total length. If `styleMap` is set then the key “labelLength” of the `styles` option is ignored. If set to null the layer does not act.
layerAreaOptions
{Object} Any optional properties to be set on the layer of <layerArea> of the total area. If `styleMap` is set then the key “labelArea” of the `styles` option is ignored. If set to null the layer does not act.
layerHeadingOptions
{Object} Any optional properties to be set on the layer of <layerHeading> of the angle of the segments. If `styleMap` is set then the key “labelHeading” of the `styles` option is ignored. If set to null the layer does not act.
drawingLayer
{<OpenLayers.Layer.Vector>} Optional drawing layer to store the drawing when finished.
multi
{Boolean} Cast features to multi-part geometries before passing to the drawing layer
keep
{Boolean} Keep annotations for every measures.
47 |
48 |
Functions
49 |
50 |
destroy
destroy: function()
51 |
52 |
activate
activate: function()
53 |
54 |
deactivate
deactivate: function()
55 |
56 |
emptyKeeped
emptyKeeped: function ()
Remove annotations from layers layerSegmentsKeep, layerLengthKeep, layerAreaKeep.
57 |
58 |
setImmediate
setImmediate: function(
immediate
)
Sets the <immediate> property. Changes the activity of immediate measurement.
59 |
60 |
Constants
61 |
62 |
OpenLayers.Control.DynamicMeasure.styles
Contains the keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a objects with style keys.
63 |
64 |
OpenLayers.Control.DynamicMeasure.positions
Contains the keys: “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a strings with values ‘start’, ‘middle’ and ‘end’ allowed for all keys (refered of last segment) and ‘center’ and ‘initial’ (refered of the measured feature and only allowed for “labelLength” and “labelArea” keys)
Compatible with OpenLayers from 2.11 to 2.13 & dev
DynamicMeasure
73 |
74 |
75 |
76 |
77 |
{OpenLayers.Layer.Vector} Drawing layer to store the drawing when finished.
destroy: function()
activate: function()
deactivate: function()
emptyKeeped: function ()
Remove annotations from layers layerSegmentsKeep, layerLengthKeep, layerAreaKeep.
setImmediate: function(
immediate
)
Sets the immediate property.
Contains the keys: “Point”, “Line”, “Polygon”, “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a objects with style keys.
Contains the keys: “labelSegments”, “labelHeading”, “labelLength” and “labelArea” as a strings with values ‘start’, ‘middle’ and ‘end’ allowed for all keys (refered of last segment) and ‘center’ and ‘initial’ (refered of the measured feature and only allowed for “labelLength” and “labelArea” keys)