Skip to content
Commits on Source (3)
{
"name": "@zandor300/react-apple-mapkitjs",
"version": "0.7.2",
"version": "0.8.0",
"description": "A react wrapper for apple mapkit.js",
"main": "lib/index.js",
"scripts": {
......
......@@ -3,7 +3,7 @@ import TokenManager from "./TokenManager"
class AppleMaps extends Component {
componentDidMount() {
const { children, initialMapType, token } = this.props
const { children, initialMapType, token, colorScheme } = this.props
TokenManager.getInstance().setToken(token)
......@@ -24,6 +24,9 @@ class AppleMaps extends Component {
if(initialMapType !== undefined) {
this.map.mapType = initialMapType
}
if(colorScheme !== undefined) {
this.map.colorScheme = colorScheme
}
// Annotations
if (children !== undefined && children.length) {
......@@ -79,11 +82,16 @@ class AppleMaps extends Component {
zoomLevel,
width,
height,
autoAdjust
autoAdjust,
colorScheme
} = this.props
TokenManager.getInstance().setToken(token)
if(colorScheme !== prevProps.colorScheme) {
this.map.colorScheme = colorScheme
}
if((
prevProps.latitude !== latitude ||
prevProps.longitude !== longitude ||
......
const Light = "light"
const Dark = "dark"
export default {
Light,
Dark
}
const Standard = "standard"
const MutedStandard = "mutedStandard"
const Hybrid = "hybrid"
const Satellite = "satellite"
export default {
Standard,
MutedStandard,
Hybrid,
Satellite
}
export { default as AppleMaps } from './AppleMaps'
export { default as Annotation } from './Annotation'
export { default as ImageAnnotation } from './ImageAnnotation'
export { default as CurrentLocationOverride} from './CurrentLocationOverride'
export { default as CurrentLocationOverride } from './CurrentLocationOverride'
export { default as MapType } from './MapType';
export { default as ColorScheme } from './ColorScheme';