Skip to content

Commit

Permalink
Merge branch 'feature/upgradeNS7' into fix/ns7
Browse files Browse the repository at this point in the history
Merged as it fixes the majority of this issue: dapriett#444

Awaiting PR dapriett#466
  • Loading branch information
James Macmillan committed May 6, 2021
2 parents 923d441 + ae61d59 commit 737df91
Show file tree
Hide file tree
Showing 9 changed files with 11,649 additions and 2,718 deletions.
6 changes: 4 additions & 2 deletions publish/pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ pack() {

# compile package and copy files required by npm
echo 'Building /src...'
node_modules/.bin/tsc -p "$TO_SOURCE_DIR/tsconfig.json"
cd "$TO_SOURCE_DIR"
node_modules/.bin/tsc
cd ..

echo 'Creating package...'
# create package dir
Expand All @@ -42,4 +44,4 @@ pack() {
node_modules/.bin/rimraf "$TO_SOURCE_DIR"
}

install && pack
install && pack
18 changes: 15 additions & 3 deletions src/map-view-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
MapView, Position, Marker, Shape, Polyline, Polygon, Projection,
Circle, Camera, MarkerEventData, ShapeEventData, VisibleRegion,
CameraEventData, PositionEventData, Bounds, Style, UISettings, IndoorBuilding, IndoorLevel,
IndoorLevelActivatedEventData, BuildingFocusedEventData
IndoorLevelActivatedEventData, BuildingFocusedEventData, StyleElement, StyleFeatureType, StyleElementType, StyleStylers
} from "./map-view";
import { Point } from "@nativescript/core/ui/core/view";
import { View, Template, KeyedTemplate, Image, LayoutBase, Property, Color, Builder, eachDescendant, ProxyViewContainer, StackLayout } from "@nativescript/core";
Expand Down Expand Up @@ -83,8 +83,6 @@ function onDescendantsLoaded(view: View, callback: () => void) {
watchLoaded(view, View.loadedEvent);
}

export { Style as StyleBase };

export module knownTemplates {
export const infoWindowTemplate = "infoWindowTemplate";
}
Expand Down Expand Up @@ -412,6 +410,20 @@ export interface UISettingsBase {
readonly zoomGesturesEnabled: boolean;
}

export class StyleElementBase implements StyleElement {
public featureType?: StyleFeatureType;
public elementType?: StyleElementType;
public stylers: Array<StyleStylers>;
}

export class StyleBase extends Array<StyleElementBase> implements Style {
public center: Position;
public radius: number;
public strokeWidth: number;
public strokeColor: Color;
public fillColor: Color;
}

export abstract class ProjectionBase implements Projection {
public visibleRegion: VisibleRegion;
public abstract fromScreenLocation(point: Point): Position;
Expand Down
1 change: 1 addition & 0 deletions src/map-view.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export * from "./map-view-common";
declare const com: any;
declare const android: any;


export class MapView extends MapViewBase {

protected _markers: Array<Marker> = new Array<Marker>();
Expand Down
5 changes: 3 additions & 2 deletions src/map-view.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export * from "./map-view-common";

declare function UIEdgeInsetsMake(...params: any[]): any;


@NativeClass()
class IndoorDisplayDelegateImpl extends NSObject implements GMSIndoorDisplayDelegate {

Expand Down Expand Up @@ -354,8 +355,8 @@ export class MapView extends MapViewBase {
}
}

get ios(): never {
throw new Error('Now use instance.nativeView instead of instance.ios');
get ios(): any {
return this.nativeView;
}

get gMap() {
Expand Down
Loading

0 comments on commit 737df91

Please sign in to comment.