Skip to main content

interface IMapView

(Niantic.Lightship.Maps.Core.IMapView)

Overview

This interface represents a viewable area of the map.

    interface IMapView: IDisposable {
// properties

LatLng MapCenter;
double MapRadius;
IReadOnlyDictionary<ulong, IMapTile> ActiveMapTiles;
bool AreMapTileRequestsPending;

// events

event MapTileAdded();
event MapTileRemoved();
event MapViewRadiusChanged();
event MapViewCenterChanged();
event ZoomLevelTransitionBegin();
event ZoomLevelTransitionEnd();
event MapTileRequestsPending();
event MapTileRequestsCompleted();

// methods

void SetMapViewCenter(in LatLng latLng);
void SetMapViewRadius(double mapRadius);
void SetViewableArea(in LatLng latLng, double mapRadius);
void SetViewableArea(in ViewPoint viewPoint);
};

Detailed Documentation

This interface represents a viewable area of the map.

Properties

MapCenter

LatLng MapCenter

The center of the map view's viewable area

MapRadius

double MapRadius

The radius of the map view's viewable area, in meters

ActiveMapTiles

IReadOnlyDictionary<ulong, IMapTile> ActiveMapTiles

All active IMapTile s in the current IMapView

AreMapTileRequestsPending

bool AreMapTileRequestsPending

True when there are pending requests for IMapTile s.

Events

MapTileAdded

event MapTileAdded()

Event that's raised when a new IMapTile has been downloaded or retrieved from the local cache, decoded, and is ready for use.

MapTileRemoved

event MapTileRemoved()

Event that's raised when an IMapTile is no longer in view.

MapViewRadiusChanged

event MapViewRadiusChanged()

Event that's raised when the map view's radius changes.

MapViewCenterChanged

event MapViewCenterChanged()

Event that's raised when the map view's center changes.

ZoomLevelTransitionBegin

event ZoomLevelTransitionBegin()

Event that's raised at the beginning of the transition from one zoom level to another.

ZoomLevelTransitionEnd

event ZoomLevelTransitionEnd()

Event that's raised when the transition from one zoom level to another is complete, and that all pending requests for IMapTile s from the new zoom level have been fulfilled.

MapTileRequestsPending

event MapTileRequestsPending()

Event that's raised when the current IMapView has pending requests for IMapTile s.

MapTileRequestsCompleted

event MapTileRequestsCompleted()

Event that's raised when all of the current IMapView 's pending requests for IMapTile s have been fulfilled.

Methods

SetMapViewCenter

void SetMapViewCenter(in LatLng latLng)

This method is called to update the IMapView 's position (in response to changes in the device's GPS, for example).

    Parameters:

    latLng - The map view's center, in lat/lng coordinates.

SetMapViewRadius

void SetMapViewRadius(double mapRadius)

This method is called to update the map view's viewable radius (when the map is zoomed in or out, for example).

    Parameters:

    mapRadius - The map view's viewable radius, in meters.

SetViewableArea

void SetViewableArea(in LatLng latLng, double mapRadius)

This method is called to update the IMapView 's position and viewable radius (in response to changes in the device's GPS or if the map is zoomed in or out, for example).

    Parameters:

    latLng - The map view's center, in lat/lng coordinates.

    mapRadius - The map view's viewable radius, in meters.

SetViewableArea

void SetViewableArea(in ViewPoint viewPoint)

This method is called to update the IMapView 's position and viewable radius (in response to changes in the device's GPS or if the map is zoomed in or out, for example).

    Parameters:

    viewPoint - The view's location and viewable radius