Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
144 changes: 100 additions & 44 deletions README.md

Large diffs are not rendered by default.

31 changes: 15 additions & 16 deletions example-app/src/pages/Map/ConfigMap.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useState } from 'react';
import { GoogleMap } from '@capacitor/google-maps';
import { MapType } from '@capacitor/google-maps';
import { IonButton, IonTextarea } from '@ionic/react';
import BaseTestingPage from '../../components/BaseTestingPage';

Expand Down Expand Up @@ -87,10 +86,10 @@ const ConfigMapPage: React.FC = () => {
setCommandOutput("");
try {
const map1 = maps[0];
await map1.setMapType(MapType.Terrain)
await map1.update({ mapTypeId: 'terrain' })

const map2 = maps[1];
await map2.setMapType(MapType.Satellite)
await map2.update({ mapTypeId: 'satellite' })
} catch(err: any) {
setCommandOutput(err.message);
}
Expand All @@ -111,7 +110,7 @@ const ConfigMapPage: React.FC = () => {
animate: true,
animationDuration: 50,
})
await map1.enableIndoorMaps(true);
await map1.update({ isIndoorMapsEnabled: true });
} catch(err: any) {
setCommandOutput(err.message);
}
Expand All @@ -121,15 +120,15 @@ const ConfigMapPage: React.FC = () => {
setCommandOutput("");
try {
const map1 = maps[0];
await map1.enableTrafficLayer(true);
await map1.update({ isTrafficLayerEnabled: true });
await map1.setCamera({
zoom: 10,
animate: true,
animationDuration: 50,
})

const map2 = maps[0];
await map2.enableTrafficLayer(true);
await map2.update({ isTrafficLayerEnabled: true });
} catch(err: any) {
setCommandOutput(err.message);
}
Expand All @@ -139,10 +138,10 @@ const ConfigMapPage: React.FC = () => {
setCommandOutput("");
try {
const map1 = maps[0];
await map1.enableTrafficLayer(false);
await map1.update({ isTrafficLayerEnabled: false });

const map2 = maps[0];
await map2.enableTrafficLayer(false);
await map2.update({ isTrafficLayerEnabled: false });
} catch(err: any) {
setCommandOutput(err.message);
}
Expand Down Expand Up @@ -171,15 +170,15 @@ const ConfigMapPage: React.FC = () => {
animate: true,
animationDuration: 50,
})
await map1.enableCurrentLocation(true);
await map1.update({ isMyLocationEnabled: true });

const map2 = maps[1];
await map2.setCamera({
zoom: 1,
animate: true,
animationDuration: 50,
});
await map2.enableCurrentLocation(true);
await map2.update({ isMyLocationEnabled: true });
} catch(err: any) {
setCommandOutput(err.message);
}
Expand All @@ -189,10 +188,10 @@ const ConfigMapPage: React.FC = () => {
setCommandOutput("");
try {
const map1 = maps[0];
await map1.enableCurrentLocation(false);
await map1.update({ isMyLocationEnabled: false });

const map2 = maps[1];
await map2.enableCurrentLocation(false);
await map2.update({ isMyLocationEnabled: false });
} catch(err: any) {
setCommandOutput(err.message);
}
Expand All @@ -202,10 +201,10 @@ const ConfigMapPage: React.FC = () => {
setCommandOutput("");
try {
const map1 = maps[0];
await map1.enableAccessibilityElements(true);
await map1.update({ isAccessibilityElementsEnabled: true });

const map2 = maps[1];
await map2.enableAccessibilityElements(true);
await map2.update({ isAccessibilityElementsEnabled: true });
} catch(err: any) {
setCommandOutput(err.message);
}
Expand All @@ -215,10 +214,10 @@ const ConfigMapPage: React.FC = () => {
setCommandOutput("");
try {
const map1 = maps[0];
await map1.enableAccessibilityElements(false);
await map1.update({ isAccessibilityElementsEnabled: false });

const map2 = maps[1];
await map2.enableAccessibilityElements(false);
await map2.update({ isAccessibilityElementsEnabled: false });
} catch(err: any) {
setCommandOutput(err.message);
}
Expand Down
2 changes: 1 addition & 1 deletion example-app/src/pages/Markers/MultipleMarkers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const MultipleMarkers: React.FC = () => {
animate: true,
animationDuration: 50,
});
await map?.enableCurrentLocation(true);
await map?.update({ isMyLocationEnabled: true });
}

async function showCurrentBounds() {
Expand Down
Loading
Loading