Skip to content

Commit

Permalink
Merge pull request #66 from neo-garaix/dev
Browse files Browse the repository at this point in the history
UPDATE to OpenLayers v9.1.0 & ADD BingMaps type of Layer & Async behaviour
  • Loading branch information
jahow authored Oct 18, 2024
2 parents ff7137e + 750df88 commit e05b177
Show file tree
Hide file tree
Showing 12 changed files with 353 additions and 220 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,19 @@ Additional options for `ImageArcGISRest` layer type.
| `tiled` | `boolean` | Indicates whether the WMS layer should be requested as tiles. Defaults to `false`. |
| `params` | `object` | ArcGIS Rest parameters. This field is optional. |

#### `BingMaps layer` type

Options for `BingMaps` layer type. (Doesn't work with URL)

| field | type | description |
|---|---|---|
| `type` | `string` | BingMaps |
| `imagerySet` | `string` | Indicates which set to use `Road`, ... |
| `apiKey` | `string` | Api Key of BingMaps (can be generated here : https://www.bingmapsportal.com/). |
| `attributions` | `string` | Attribution for the data present in the layer. |
| `culture` | `string` | Culture code. Defaults is `en-us`. |
| `legend` | `boolean` | Include this layer in the map legend. Defaults is false. |

#### `projectionDefinition` type

A `projectionDefinition` object describes a projection to be registered in proj4.
Expand Down
23 changes: 23 additions & 0 deletions demo/preset-specs.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
const BingMapsJSONSpec = {
layers: [
{
type: 'BingMaps',
imagerySet: 'Road',
apiKey: '{can be generated here : https://www.bingmapsportal.com/}',
attribution: '© Microsoft Corporation',
},
],
size: [400, 240, 'mm'],
center: [3, 46.5],
dpi: 120,
scale: 7000000,
scaleBar: {
position: 'bottom-left',
units: 'metric',
},
projection: 'EPSG:3857',
northArrow: 'top-right',
attributions: 'bottom-right',
};

const OsmAndGeoJSONSpec = {
layers: [
{
Expand Down Expand Up @@ -698,6 +720,7 @@ const PresetSpecs = {
'Europe in OpenStreetMap (WMS, tiled)': OsmWmsSpec,
'France in OpenStreetMap and GeoJSON': OsmAndGeoJSONSpec,
'France in IGN orthophotos (WMTS)': IgnOrthoWmtsSpec,
'France in BingMaps road (BingMaps)': BingMapsJSONSpec,
'Volcanoes Terrain model (WMS)': AuvergneTerrainSpec,
'Mars Perseverance Rover Landing Site': MarsRoverLandingSpec,
'Bayonne, 1935 (WMTS)': BayonneWmtsSpec,
Expand Down
Loading

0 comments on commit e05b177

Please sign in to comment.