Environment API

This page details all of the available NEON API functionality contained within the static API class NeonEnvironment

Download Buildings in Area

Once buildings have been created using the NEON Command PC Application, they are stored in a NEON cloud account. Once you have successfully logged in to that account, you can request to download all buildings that are in an area specified by a Latitude-Longitude Rectangle. Usually, this rectangle would be specified by the area of a satellite map that a user is viewing. The work to download the buildings is performed on the provided handler, and results are returned via the INeonBuildingListener. If this is the first time the NEON Location Service has been asked to download this area, it will perform a network operation to retrieve the buildings. All subsequent requests will return locally cached buildings, as long as DownloadOptions is set to CACHED (default behavior). If changes have been made to the cached buildings, setting the DownloadOptions to FORCE_REFRESH will requery and update all data over the network. FORCE_REFRESH is an expensive operation and should only be triggered on user input.

void downloadBuildingsInArea(LatLongRect bounds, Handler h, INeonBuildingListener listener, DownloadOptions downloadOptions)

Download Floor Plans

Once buildings have been returned to the INeonBuildingListener, you can request floor plans for any of the floors in that building. A NeonBuilding has an array of NeonBuildingFloor. Each NeonBuildingFloor can have a floor plan image associated with it. To retrieve this image, call NeonEnvironment.downloadFloorPlan() with the associated NeonBuildingFloor. Work will be performed on the handler and the result, if any, will be returned in the INeonFloorPlanListener.

void downloadFloorPlan(Context context, NeonBuildingFloor floor, Handler h, INeonFloorPlanListener listener)

Get a Known Building by ID

If a building already exists in the NEON Location Service and its ID is known, you can get it directly by ID. You could use this to retrieve a building and floor plan for display based on what the user is tracking in. The NeonLocation object will specify the ID of the building that the user is inside.

NeonBuilding getBuilding(UUID id)