/*
********************* [ P O C K E T C A M P U S ] *****************
* [ LICENCE ] see "licence"-file in the root directory
* [ MAINTAINER ] romain.testuz@epfl.ch
* [ STATUS ] working
*
**************************[ C O M M E N T S ]**********************
*
* Map interface
*
*******************************************************************
*/
package org.pocketcampus.map;
import java.util.Set;
import java.util.TreeSet;
import org.pocketcampus.map.element.MapElement;
import org.pocketcampus.shared.map.MapElementType;
public interface IMap {
/**
* Gives the walkable distance in meters between two points.
*/
double walkableDistanceBetween(MapElement start, MapElement end, boolean bike);
/**
* Distance in straight line.
*/
double directDistanceBetween(MapElement start, MapElement end);
/**
* Returns the MapElement representing the current user. This is useful for example to
* compute a path from the current location to some other place.
*/
MapElement getCurrentUserMapElement();
/**
* Returns a Set of all the MapElements of a given type.
*/
Set<MapElement> searchMapElement(MapElementType type);
/**
* Returns a Set of all the MapElements of a given type matching a search string.
* Note that you can find a person using this.
*/
Set<MapElement> searchMapElement(MapElementType type, String search);
/**
* Adds the drawing of MapElements to the draw stack.
*/
void drawMapElements(Set<MapElement> elems);
/**
* Adds the drawing of a walkable path between two points on the draw stack.
* The path is computed by the EPFL mapping system and is the shortest between these points.
* @return
*/
boolean drawPathBetween(MapElement start, MapElement end, boolean bike);
/**
* Centers the map on an element with the specified radius.
*/
void centerMapOn(MapElement el, double radius);
/**
* Clears all paths and elements from the map.
*/
void clearAll();
/**
* Clears all paths from the map.
*/
void clearPaths();
/**
* Clears all elements from the map.
*/
void clearMapElements();
/**
* Center the map on the EPFL campus with a given radius.
*/
void centerMapOnEPFL(double radius);
/**
* Centers the map on the currently displayed path.
*/
void centerMapOnPath();
/**
* Checks if the user is currently located on the EPFL campus.
*/
boolean isUserInEPFL();
/**
* Returns all the MapElements located in a given radius from the <code>center</code> MapElement, matching the <code>search</code> string.
* The results are ordered by distance to the center.
*/
TreeSet<MapElement> searchAround(MapElement center, double radius,
MapElementType type, String search);
/**
* If the current renderer handles multi-level display, changes the current level.
*/
void setLevel(int level);
}
|