Skip to content

chore: upgrade azure-maps-control to v3 #153

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 24 commits into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d9c8cb8
fix package json incorrect imports
sebasptsch Nov 7, 2022
19d5993
Merge pull request #133 from sebasptsch/pkg-json-fix
yulinscottkang Nov 10, 2022
1f52cdd
chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2
dependabot[bot] Dec 9, 2022
235f61c
chore(deps): bump qs from 6.5.2 to 6.5.3
dependabot[bot] Dec 9, 2022
062e3e7
Merge pull request #139 from Azure/dependabot/npm_and_yarn/decode-uri…
yulinscottkang Dec 14, 2022
d113b17
Merge pull request #140 from Azure/dependabot/npm_and_yarn/qs-6.5.3
yulinscottkang Dec 14, 2022
6f0c061
chore(deps): bump express from 4.17.1 to 4.18.2
dependabot[bot] Dec 14, 2022
8d6c328
Merge pull request #143 from Azure/dependabot/npm_and_yarn/express-4.…
yulinscottkang Dec 14, 2022
34ef190
chore(deps): bump json5 from 1.0.1 to 1.0.2
dependabot[bot] Jan 8, 2023
3e1a822
Merge pull request #144 from Azure/dependabot/npm_and_yarn/json5-1.0.2
yulinscottkang Jan 9, 2023
9bc7a49
chore: remove circleci config
Jan 13, 2023
68e5613
Merge pull request #145 from yulinscottkang/ci
yulinscottkang Jan 13, 2023
aa0f8b5
fix: using dist version of mapbox gl css
Mar 12, 2023
bcc1ead
chore: undo formatting
Mar 12, 2023
492445a
chore: undo formatting 2
Mar 12, 2023
ac2df28
Merge pull request #147 from rvdkooy/use_compiled_version_of_mapbox
yulinscottkang Mar 16, 2023
117a12d
chore: bump version to 0.4.5
Mar 16, 2023
401cd23
Merge pull request #148 from yulinscottkang/release
yulinscottkang Mar 16, 2023
f39d0e7
fixing authentication type export
Lucas-Levandoski Mar 29, 2023
545d030
fixing indentation
Lucas-Levandoski Mar 29, 2023
d8601d4
removing indentation
Lucas-Levandoski Mar 29, 2023
4f75def
Merge pull request #150 from Lucas-Levandoski/master
yulinscottkang Apr 11, 2023
7872e73
chore: resolve conflicts
Apr 25, 2023
d847329
chore: upgrade azure-maps-control to v3
Apr 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .circleci/config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Generated documentation from typedoc is available [Documentation](https://azure.
## Compatibility with azure-maps-controls

```
1.0.0 - 3.0.0
0.2.0 - 2.0.32
0.1.4 - 2.0.31
0.1.3 - 2.0.25
Expand Down Expand Up @@ -74,8 +75,7 @@ The library implements a lot of ready to use components like `AzureMapFeature, A

```javascript
import React from 'react'
import {AzureMap, AzureMapsProvider, IAzureMapOptions} from 'react-azure-maps'
import {AuthenticationType} from 'azure-maps-control'
import {AzureMap, AzureMapsProvider, IAzureMapOptions, AuthenticationType} from 'react-azure-maps'

const option: IAzureMapOptions = {
authOptions: {
Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-azure-maps",
"version": "1.0.0-beta.0",
"version": "1.0.0-beta.1",
"description": "React Wrapper for Azure Maps",
"keywords": [
"react",
Expand All @@ -13,9 +13,14 @@
"maps",
"react-azure-maps"
],
"source": "src/react-azure-maps.ts",
"module": "dist/react-azure-maps.es5.js",
"typings": "dist/types/react-azure-maps.d.ts",
"types": "dist/types/react-azure-maps.d.ts",
"exports": {
".": {
"import": "./dist/react-azure-maps.es5.js",
"types": "./dist/types/react-azure-maps.d.ts"
}
},
"files": [
"dist"
],
Expand Down Expand Up @@ -113,13 +118,13 @@
"typescript": "^4.1.2"
},
"peerDependencies": {
"azure-maps-control": "2.0.32",
"azure-maps-control": "^3.0.0-preview.6",
"guid-typescript": "^1.0.9",
"react": "^17.0.2 || ^18.0.0",
"react-dom": "^17.0.2 || ^18.0.0"
},
"dependencies": {
"azure-maps-control": "2.0.32",
"azure-maps-control": "^3.0.0-preview.6",
"guid-typescript": "^1.0.9"
}
}
7 changes: 2 additions & 5 deletions src/components/AzureMap/useCreateMapControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ import atlas, {
ZoomControlOptions
} from 'azure-maps-control'



export const createMapControls = (mapRef: MapType, controls: IAzureMapControls[]) => {
controls.forEach((control: IAzureMapControls) => {
const { controlName, options, controlOptions } = control
mapRef.controls.add(
createControl(controlName, controlOptions) as atlas.ControlBase,
createControl(controlName, controlOptions) as atlas.control.ControlBase,
options as ControlOptions
)
})
Expand All @@ -23,7 +21,7 @@ export const createMapControls = (mapRef: MapType, controls: IAzureMapControls[]
export const createControl = (
type: string,
options?: ControlOptions
): atlas.ControlBase | undefined => {
): atlas.control.ControlBase | undefined => {
switch (type) {
case 'CompassControl':
return new atlas.control.CompassControl(options as CompassControlOptions)
Expand All @@ -50,4 +48,3 @@ export const createMapCustomControls = (
mapRef.controls.add(control, controlOptions)
})
}

1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,4 @@ export type AzureDataLineString = atlas.data.LineString
export type AzureDataPosition = atlas.data.Position
export type ControlOptions = atlas.ControlOptions
export type AzureSetCameraOptions = ((CameraOptions | CameraBoundsOptions) & AnimationOptions) | any
export { AuthenticationType } from 'azure-maps-control'
Loading