new GeoreferenceManager(viewer, layer)
Creates a new GeoreferenceManager
Parameters:
| Name | Type | Description |
|---|---|---|
viewer |
Object | OpenLIME Viewer instance |
layer |
Object | Layer containing the geographic image |
- Source:
Methods
-
canvasToGeo(x, y)
-
Converts canvas HTML coordinates to WGS84 coordinates
Parameters:
Name Type Description xnumber X coordinate in canvas
ynumber Y coordinate in canvas
- Source:
Returns:
Geographic coordinates {lat, lon} in degrees
- Type
- Object
-
flyTo(lat, lon [, zoom] [, duration] [, easing])
-
Navigate to a geographic position with animation
Parameters:
Name Type Argument Default Description latnumber Latitude in degrees
lonnumber Longitude in degrees
zoomnumber <optional>
Zoom level (optional)
durationnumber <optional>
250 Animation duration in ms
easingstring <optional>
'linear' Easing function
- Source:
-
geoToScene(lat, lon)
-
Converts WGS84 coordinates to scene coordinates
Parameters:
Name Type Description latnumber Latitude in degrees
lonnumber Longitude in degrees
- Source:
Returns:
Scene coordinates {x, y}
- Type
- Object
-
geoToWebMercator(lat, lon)
-
Converts WGS84 (EPSG:4326) coordinates to Web Mercator (EPSG:3857)
Parameters:
Name Type Description latnumber Latitude in degrees
lonnumber Longitude in degrees
- Source:
Returns:
Point in Web Mercator coordinates {x, y}
- Type
- Object
-
getCurrentPosition()
-
Gets the current geographic position and zoom
- Source:
Returns:
Current position {lat, lon, zoom}
- Type
- Object
-
sceneToGeo(x, y)
-
Converts scene coordinates to WGS84 (EPSG:4326) coordinates
Parameters:
Name Type Description xnumber X coordinate in scene space
ynumber Y coordinate in scene space
- Source:
Returns:
Geographic coordinates {lat, lon} in degrees
- Type
- Object
-
sceneToWebMercator(x, y)
-
Converts scene coordinates to Web Mercator
Parameters:
Name Type Description xnumber X coordinate in scene space
ynumber Y coordinate in scene space
- Source:
Returns:
Web Mercator coordinates {x, y}
- Type
- Object
-
webMercatorToGeo(x, y)
-
Converts Web Mercator (EPSG:3857) coordinates to WGS84 (EPSG:4326)
Parameters:
Name Type Description xnumber X coordinate in Web Mercator
ynumber Y coordinate in Web Mercator
- Source:
Returns:
Geographic coordinates {lat, lon} in degrees
- Type
- Object
-
webMercatorToScene(x, y)
-
Converts Web Mercator coordinates to Scene coordinates
Parameters:
Name Type Description xnumber X coordinate in Web Mercator
ynumber Y coordinate in Web Mercator
- Source:
Returns:
Scene coordinates {x, y}
- Type
- Object