Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Camera Controls

  • getFovGets the current field of view for the active sphere, passes it to the optional callback function (if provided), and returns it.
  • getFovRangeGets the range for the field of view for the active sphere, passes it to the optional callback function (if provided), and returns it.
  • getLookAtGets data about where the user is looking, passes it to the optional callback function (if provided), and returns it.
  • getZoomGets the current zoom level for the active sphere, passes it to the optional callback function (if provided), and returns it.
  • getZoomRangeGets the zoom level range for the active sphere, passes it to the optional callback function (if provided), and returns it.
  • setFovSets the current field of view for the active sphere.
  • setFovRangeSets the range for the field of view for the active sphere.
  • setLookAtSets the pan and tilt.
  • setZoomSets the current zoom level for the active sphere.
  • setZoomRangeSets the zoom level range for the active sphere.

Constructor

Creates a new AerialSphere object, which is used for all the other functions documented here.

Events

  • onClickThe callback function passed here becomes the onclick handler for clicks within the AerialSphere frame.
  • onMarkerClickThe callback function passed here handles clicks on user-defined markers. See addMarker for documentation on creating markers.
  • onViewChangeThe callback function passed here is called whenever the view is changed by the user within the sphere view. User-changed views happen when the user adjusts pan or tilt with their mouse, or when they zoom in or out.

Marker Functionality

  • addMarkerAdds a marker to the sphere, either at a specified latitude and longitude, or at the specified address.
  • getMarkerSearches for a marker with the given id, passes it to the optional callback function (if provided), and returns it.
  • removeAllMarkersDeletes all markers by setting sphereData to an object with only an empty layers array.
  • setCustomMarkerDistanceSets the distance, in meters, for which custom markers are displayed. Set to zero to not display any custom markers. Ignored if there is a custom marker list (see setCustomMarkerList).
  • setCustomMarkerListSet a list of specific custom markers to display, regardless of the distance defined by customMarkerDistance. The list contains custom marker ids. Set to [] to clear the list.
  • setSphereMarkerListSet a list of specific sphere markers to display, regardless of the distance defined by sphereMarkerDistance. The list contains sphere ids. Set to [] to clear the list.

Other Functions

  • getLayerSearches for a layer with the given name, passes it to the optional callback function (if provided), and returns it. This will search both polygon and marker layers at once.
  • getPositionInfoGets the latitude/longitude and pan/tilt position for a pixel on the screen within the active sphere, passes that info to the optional callback function (if provided), and returns the info.
  • setLayerVisibilitySets the visibility for the specified layer name, for all layer types: Polyline, Polygon and Marker.

Polygon Functionality

  • addPolygonAdds a polygon to the sphere using specified latitude and longitude points for vertices.
  • setPolygonDistanceSets the distance, in meters, for which polygons are displayed.

Polyline Functionality

  • addPolylineAdds a polyline to the sphere using specified latitude and longitude points for vertices. See the main polyline page https://aerialsphere.atlassian.net/wiki/x/AYCeaQ for a definition of what a polyline is.
  • setPolylineDistanceSets the distance, in meters, for which polylines are displayed.

Sphere Data

  • getDataGets the data specified below about the active sphere, passes it to the optional callback function (if provided), and returns it.
  • sendDataThe behavior of this function depends on what is passed in, if no new sphere lat/lng is passed sent data will impact current sphere.

Sphere Functionality

  • closeSphereOpens the map view and closes the sphere view. This has no effect if it is already in the map view.
  • getActiveSphereGets the active sphere, passes it to the optional callback function (if provided), and returns it.
  • getNearestSphereSearches for the sphere nearest to a specified latitude and longitude, passes it to the optional callback function (if provided), and returns it.
  • openMapOpens the map view. Closes the sphere view if it is open.
  • openSphereOpens the sphere view. Closes the map view if it is open. This has no effect if there is no active sphere.
  • openSphereByIdOpens the sphere view for the given sphere. Closes the map view if it is open.
  • setSphereMarkerDistanceSets the distance, in meters, for which sphere markers are displayed. Set to zero to not display any sphere markers. Ignored if there is a sphere marker list (see setSphereMarkerList).

UI Elements

  • No labels