1 /*
2 * Trip Tracker, a real-time position tracking system for the Internet.
3 * Copyright (C) 2006 Team Trip Tracker
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
18 */
19
20 package triptracker.client.map.core;
21
22 import javax.swing.ImageIcon;
23
24 public class MapCacheProvider extends AbstractMapProvider {
25 private final AbstractMapProvider provider;
26
27 public MapCacheProvider(AbstractMapProvider provider) {
28 this.provider = provider;
29 searchForCache();
30 }
31
32 /***
33 * Search for existing cache and update internal cache data.
34 */
35 private void searchForCache() {
36 // TODO Implement search for existing cache update.
37 }
38
39 /***
40 * {@inheritDoc}
41 */
42 @Override
43 public ImageIcon getMap(double minX, double minY,
44 double maxX, double maxY) {
45 // TODO Implement the caching in here.
46
47 return provider.getMap(minX, minY, maxX, maxY);
48 }
49
50 }