Home | History | Annotate | Download | only in navigation

Lines Matching defs:centre

33     private Position centre;
35 /* The x and y co-ordinates for the viewport's centre */
56 this.centre = new Position(0, 0);
70 // Determine the map's x,y centre
111 public void setCentre(Position centre) {
112 this.centre = centre;
139 // Get the distance between position and the centre for calculating
141 double distance = NavCalculator.computeLongDiff(centre.getLongitude(),
144 // Use the distance from the centre to calculate the pixel x co-ordinate
148 double dmp = NavCalculator.computeDMPClarkeSpheroid(centre.getLatitude(),
154 if (centre.getLatitude() == position.getLatitude()) {
157 if (centre.getLongitude() == position.getLongitude()) {
162 if (centre.getLatitude() > 0 && position.getLatitude() > centre.getLatitude()) {
163 // Centre is north. Position is north of centre
165 } else if (centre.getLatitude() > 0 && position.getLatitude() < centre.getLatitude()) {
166 // Centre is north. Position is south of centre
168 } else if (centre.getLatitude() < 0 && position.getLatitude() > centre.getLatitude()) {
169 // Centre is south. Position is north of centre
171 } else if (centre.getLatitude() < 0 && position.getLatitude() < centre.getLatitude()) {
172 // Centre is south. Position is south of centre
174 } else if (centre.getLatitude() == 0 && position.getLatitude() > centre.getLatitude()) {
175 // Centre is at the equator. Position is north of the equator
177 } else if (centre.getLatitude() == 0 && position.getLatitude() < centre.getLatitude()) {
178 // Centre is at the equator. Position is south of the equator
183 if (centre.getLongitude() < 0 && position.getLongitude() < centre.getLongitude()) {
184 // Centre is west. Position is west of centre
186 } else if (centre.getLongitude() < 0 && position.getLongitude() > centre.getLongitude()) {
187 // Centre is west. Position is south of centre
189 } else if (centre.getLongitude() > 0 && position.getLongitude() < centre.getLongitude()) {
190 // Centre is east. Position is west of centre
192 } else if (centre.getLongitude() > 0 && position.getLongitude() > centre.getLongitude()) {
193 // Centre is east. Position is east of centre
195 } else if (centre.getLongitude() == 0 && position.getLongitude() > centre.getLongitude()) {
196 // Centre is at the equator. Position is east of centre
198 } else if (centre.getLongitude() == 0 && position.getLongitude() < centre.getLongitude()) {
199 // Centre is at the equator. Position is west of centre
220 // Get the distance between position and the centre
235 lon = (p.getX() < xCentre ? centre.getLongitude() - lonDistanceInDegrees
236 : centre.getLongitude() + lonDistanceInDegrees);
263 * Defines the centre of the map in pixels
264 * @param p <code>Point</code> object denoting the map's new centre
271 centre = newCentre;
297 * Returns the pixel (x,y) centre of the map
298 * @return {@link Point) object marking the map's (x,y) centre
306 * Returns the {@code Position} centre of the map
307 * @return {@code Position} object marking the map's (lat, long) centre
311 return centre;