Using PascalCase for geometry enum values

This adds a bit more inconsistency to the library, but we didn't have complete consistency before.  Almost all existing string enum values are lowercase (a couple are camelCase and one is dash-separated).  The closure library isn't consistent either (with case for enum properties or values).  I imagine this could be justified in saying someone could blindly use GeoJSON type values in places, but in the end, you'll need to read the docs before guessing right.
This commit is contained in:
Tim Schaub
2013-12-05 14:09:11 -07:00
parent 4ee9605d61
commit 2f7fa8f442
7 changed files with 71 additions and 71 deletions

View File

@@ -346,8 +346,8 @@
* @property {ol.layer.Vector} layer Destination layer for the features.
* @property {number|undefined} snapTolerance Pixel distance for snapping to the
* drawing finish (default is 12).
* @property {ol.geom.GeometryType} type Drawing type ('point', 'linestring',
* 'polygon', 'multipoint', 'multilinestring', or 'multipolygon').
* @property {ol.geom.GeometryType} type Drawing type ('Point', 'LineString',
* 'Polygon', 'MultiPoint', 'MultiLineString', or 'MultiPolygon').
* @todo stability experimental
*/

View File

@@ -81,12 +81,12 @@ goog.inherits(ol.geom.GeometryEvent, goog.events.Event);
* @todo stability experimental
*/
ol.geom.GeometryType = {
POINT: 'point',
LINE_STRING: 'linestring',
LINEAR_RING: 'linearring',
POLYGON: 'polygon',
MULTI_POINT: 'multipoint',
MULTI_LINE_STRING: 'multilinestring',
MULTI_POLYGON: 'multipolygon',
GEOMETRY_COLLECTION: 'geometrycollection'
POINT: 'Point',
LINE_STRING: 'LineString',
LINEAR_RING: 'LinearRing',
POLYGON: 'Polygon',
MULTI_POINT: 'MultiPoint',
MULTI_LINE_STRING: 'MultiLineString',
MULTI_POLYGON: 'MultiPolygon',
GEOMETRY_COLLECTION: 'GeometryCollection'
};