Commit Graph

79 Commits

Author SHA1 Message Date
Tim Schaub
99612e7f9a Remove opt_ prefix 2022-08-11 20:14:35 -06:00
Maximilian Krög
5c4339f367 Remove more IE compatibility 2022-08-12 00:26:25 +02:00
Maximilian Krög
0b945f2321 Use includes instead of indexOf 2022-08-05 01:49:01 +02:00
Tim Schaub
25d47ed752 Use Object.assign 2022-07-28 13:23:16 -06:00
Maximilian Krög
185485b0f7 Replace GeometryLayout enum with typedef 2022-07-19 23:24:22 +02:00
Andreas Hocevar
c03f58fe5d Merge pull request #12936 from ejn/bugfix/gml-multiple-element-parsing
Bugfix for GML parsing with multiple property elements with XML attributes
2022-04-05 11:57:53 +02:00
Andreas Hocevar
c6a2392a2e Update type annotations for GMLBase 2022-04-01 14:59:16 +02:00
Andreas Hocevar
e0b62016d2 Separate geometry and extent parsing 2022-03-18 19:37:01 +01:00
Andreas Hocevar
2e5c1f2af9 Updates for TypeScript v4.6.0-beta 2022-01-26 22:40:27 +01:00
Edward Nash
e1b4634fa4 Correct parsing multi-properties with attributes
When parsing GML then conversion of properties containing XML attributes
to objects with a _content_ property must occur before the handling of
multiple attributes (conversion/adding to an array), as otherwise the
_content_ property and attributes are set on the array and not on the
array element.

Prior to this change, only multiple properties without attributes could
be correctly parsed.

Example problemeatic GML section:
<Link xlink:href="http://example.com/a"/>
<Link xlink:href="http://example.com/b"/>

Resulting property as JSON extract after this change:
{
  "Link": [
    {
      "_content_": undefined,
      "xlink:href": "http://example.com/a",
    },
    {
      "_content_": undefined,
      "xlink:href": "http://example.com/b"
    }
  ]
}

Prior to this change, the _content_ property and the properties for the
XML attributes would be set on the resulting JS Array object, with
previous entries being represented as nested arrays.
2021-10-29 16:35:05 +02:00
mike-000
7b725cfdf0 add @api 2021-09-12 16:20:22 +01:00
Tim Schaub
c8067bebbb Add supported media type list to feature formats 2021-09-04 11:17:41 -06:00
Andreas Hocevar
79f5f46d27 Remove lint 2021-06-28 18:10:51 +02:00
Simon Seyock
8facb252f1 Replace google closure syntax = with brackets around name 2021-02-03 14:06:02 +01:00
Björn Harrtell
1335937ddd Verified fix 2020-08-11 16:09:43 +02:00
Andreas Hocevar
e14e41bcfb Remove private and protected scope from GML methods and members 2020-04-15 10:53:25 +02:00
Tim Schaub
054af09032 Make code prettier
This updates ESLint and our shared eslint-config-openlayers to use Prettier.  Most formatting changes were automatically applied with this:

    npm run lint -- --fix

A few manual changes were required:

 * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
 * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason.  While editing this, I reworked `ExampleBuilder` to be a class.
 * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00
Frederic Junod
d7c83e4651 Remove all inheritDoc tags from src/ol/format 2020-04-03 07:52:51 +02:00
Simon Seyock
bb0b94fedf fixed typescript issues 2019-09-25 14:10:05 +02:00
Frederic Junod
d838de32b7 Rework transformWithOptions
Create one function per input/output type: `transformGeometryWithOptions` and `transformExtentWithOptions`.
2018-12-16 08:28:26 +01:00
Frederic Junod
711afac80f Simplify import path in ol/format/ 2018-11-05 16:26:45 +01:00
Kevin Schmidt
ee9c9bcefb Fix TypeScript errors in ol/format/GML 2018-10-16 07:20:22 -06:00
Frederic Junod
6b24760299 Fix jsdoc type notation 2018-10-16 08:26:41 +02:00
Niels Charlier
594a921598 Enable parsing complex features 2018-10-16 08:26:41 +02:00
NielsCharlier
2005c82dd2 add GML3.2 format 2018-10-16 08:26:41 +02:00
NielsCharlier
6252404d5b Fix GML Format featureMember tag 2018-10-16 08:25:53 +02:00
Kevin Schmidt
d308288eed Fix TypeScript errors in ol/format/GML 2018-10-08 05:36:21 -06:00
Frederic Junod
a6861f5f49 Remove extra imports in jsdoc
The symbols are already imported (es6 import)
2018-09-06 16:40:29 +02:00
Tim Schaub
ccfacc5ee6 Transformed types
Using the [ts.js codemod](https://gist.github.com/tschaub/1ea498c9d1e5268cf36d212b3949be4e):

    jscodeshift --transform ts.js src
2018-09-05 08:05:29 -06:00
Frederic Junod
20a347b0c9 Use 'Element' type instead of 'Node' 2018-08-31 11:36:16 +02:00
Tim Schaub
affbf59b77 Use Object<Foo, Bar> instead of Object.<Foo, Bar> 2018-07-25 18:33:49 -07:00
Tim Schaub
d12ef20b12 Use Array<Foo> instead of Array.<Foo> 2018-07-25 18:32:43 -07:00
ahocevar
942a219c30 Use extends and super for format/WFS 2018-07-17 17:49:08 +02:00
ahocevar
9a28af76ca Use extends and super for GMLBase 2018-07-17 16:43:54 +02:00
Frederic Junod
540b1793e7 Move jsdoc constructor comments 2018-07-17 10:20:26 +02:00
Tim Schaub
d0ab8dce38 Lint removal 2018-07-16 17:57:57 -06:00
Tim Schaub
7b4a73f3b9 Automated class transform
npx lebab --replace src --transform class
2018-07-16 16:18:16 -06:00
ahocevar
ce97cee6a6 Accept polygons and flat coordinates in MultiPolygon constructor 2018-07-07 17:31:35 +02:00
ahocevar
0ec0491ef6 Accept flat coordinates in LinearRing constructor 2018-07-07 17:12:12 +02:00
ahocevar
a09b6c91c9 Accept linestrings and flat coordinates in MultiLineString constructor 2018-07-07 17:01:39 +02:00
ahocevar
160f1bc286 Accept flat coordinates in LineString constructor 2018-07-07 16:04:43 +02:00
ahocevar
c0d04ea077 Do not accept null coordinates in Point constructor 2018-07-07 14:48:46 +02:00
ahocevar
1da43d90af Allow flat coordinates for Polygon constructor 2018-07-07 14:16:39 +02:00
ahocevar
28409486a5 Make classes in ol/ available as named exports from ol 2018-06-21 18:08:17 +02:00
Tim Schaub
8e7c88d9a5 Updated type annotations 2018-05-07 15:50:56 -06:00
ahocevar
440d1ad3e1 Shorter module paths for default exports 2018-04-25 17:25:39 +02:00
Frederic Junod
070f08e778 Mark optional property with square brackets 2018-04-04 17:06:21 +02:00
Frederic Junod
06bd5b4423 Module type for ol.format.XMLFeature 2018-03-23 08:44:21 +01:00
Tim Schaub
cf80733e41 Module type for ol/Feature 2018-03-12 08:32:09 -06:00
Tim Schaub
ef70d71636 Module types for ol/geom 2018-03-12 08:32:09 -06:00