Skip to content

Commit

Permalink
Merge pull request #29 from niwa/feature/SV-257
Browse files Browse the repository at this point in the history
SV-257 : Update to openlayers 6, added option for defining map height…
  • Loading branch information
uweDuesing authored Sep 16, 2020
2 parents a63e8c3 + 70efab3 commit a92c71c
Show file tree
Hide file tree
Showing 12 changed files with 150 additions and 43 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ https://webpack.js.org/guides/typescript/
The geolacting functionality is provided by Nominatim
https://wiki.openstreetmap.org/wiki/Nominatim

### Gotcha's
Since the update to openlayers 6, the map container must now have a height defined to render.
This is set to 200px by default, but can be overridden by passing a numeric height value to the constructor, e.g.

```angular2
const locationPicker = new LocationPicker('body', { height: 350 });
```

### Index.ts Cheat sheet
This is for development only.
Expand Down
1 change: 1 addition & 0 deletions dist/location-picker.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export declare class LocationPicker implements EventTarget {
private geolocatedFeature;
private countryCode;
private defaultIcon;
private height;
constructor(elementRef: any, options?: Options);
toggleSearchField: () => void;
getLocation: () => void;
Expand Down
14 changes: 10 additions & 4 deletions dist/location-picker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/location-picker.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lonlat-helper.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export declare class LonlatHelper {
private directionPresent;
private directionAndNumericPresent;
adjustLongitude: (longitude: number) => number;
boundingBoxtoExtent: (boundingBox: any) => number[];
boundingBoxtoExtent: (boundingBox: any) => [number, number, number, number];
}
1 change: 1 addition & 0 deletions dist/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export declare class Options {
countryCode?: string;
defaultIcon?: string;
addressSearch?: boolean;
height?: number;
}
2 changes: 1 addition & 1 deletion dist/options.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 113 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "niwa-location-picker",
"version": "1.5.27",
"version": "1.5.28",
"description": "",
"private": false,
"main": "dist/index.js",
Expand Down Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"lodash": "^4.17.15",
"ol": "^5.3.3",
"ol": "^6.4.3",
"rxjs": "^6.5.3"
}
}
Loading

0 comments on commit a92c71c

Please sign in to comment.