File tree Expand file tree Collapse file tree 4 files changed +10
-0
lines changed
Expand file tree Collapse file tree 4 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -423,6 +423,7 @@ export class UISettingsBase implements UISettings {
423423
424424export abstract class ProjectionBase implements Projection {
425425 public visibleRegion : VisibleRegion ;
426+ public abstract containsCoordinate ( position : Position ) : Boolean ;
426427 public abstract fromScreenLocation ( point : Point ) : Position ;
427428 public abstract toScreenLocation ( position : Position ) : Point ;
428429 public ios : any ; /* GMSProjection */
Original file line number Diff line number Diff line change @@ -608,6 +608,10 @@ export class Projection extends ProjectionBase {
608608 return new VisibleRegion ( this . android . getVisibleRegion ( ) ) ;
609609 }
610610
611+ containsCoordinate ( position : Position ) : Boolean {
612+ return this . android . getVisibleRegion ( ) . latLngBounds . contains ( position . android ) ;
613+ }
614+
611615 fromScreenLocation ( point : Point ) {
612616 var latLng = this . android . fromScreenLocation ( new android . graphics . Point ( point . x , point . y ) ) ;
613617 return new Position ( latLng ) ;
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ export class UISettings {
128128
129129export class Projection {
130130 public visibleRegion : VisibleRegion ;
131+ public containsCoordinate ( position : Position ) : Boolean ;
131132 public fromScreenLocation ( point : Point ) : Position ;
132133 public toScreenLocation ( position : Position ) : Point ;
133134 public ios : any ; /* GMSProjection */
Original file line number Diff line number Diff line change @@ -560,6 +560,10 @@ export class Projection extends ProjectionBase {
560560 return new VisibleRegion ( this . ios . visibleRegion ( ) ) ;
561561 }
562562
563+ containsCoordinate ( position : Position ) : Boolean {
564+ return this . ios . containsCoordinate ( position . ios ) ;
565+ }
566+
563567 fromScreenLocation ( point : Point ) {
564568 var location = this . ios . coordinateForPoint ( CGPointMake ( point . x , point . y ) ) ;
565569 return new Position ( location ) ;
You can’t perform that action at this time.
0 commit comments