2 * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3 * This software, including documentation, is protected by copyright controlled by
4 * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5 * storing, adapting or translating, any or all of this material requires the prior
6 * written consent of HERE Global B.V. You may use this
7 * Software in accordance with the terms and conditions defined in the
8 * HERE Location Platform Services Terms and Conditions, available at
9 * http://developer.here.com/terms-conditions-base
11 * As an additional permission to the above, you may distribute Software,
12 * in object code format as part of an Application, according to, and subject to, terms and
13 * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14 * You may distribute such object code format Application under terms of your choice,
15 * provided that the header and source files of the Software have not been modified.
18 #ifndef GEOTILEPROVIDER_H
19 #define GEOTILEPROVIDER_H
21 #include "common/HereMaps_global.h"
22 #include "maps/GeoProvider.h"
24 HERE_MAPS_BEGIN_NAMESPACE
30 * This class encapsulates a map tile provider which is responsible
31 * for loading map tiles.
35 class GeoTileProvider : public GeoProvider
39 * This method is the default constructor.
44 * This method is the (virtual) destructor.
46 virtual ~GeoTileProvider();
49 * This method loads the map tile specified by the caller.
51 * @param tileKey A constant reference to an object that specifies a tile
54 * @return A value representing the identifier of request to load the tile.
56 RestItemHandle::RequestId LoadTile(const TileKey& tileKey);
59 * This method aborts loading of the map tile specified by the caller.
61 * @param tile A constant reference to an object representing the tile whose
62 * loading is to be aborted.
64 void AbortTile(const TilePtr& tile);
67 * This method registers a callback function to be invoked when the tile has loaded.
69 * @param signal A constant reference to a function to be invoked when the
70 * tile has loaded; the function accepts a reference to a
71 * <code>TileKey</code> object and a pointer to the tile bitmap (see
72 * also \ref GeoProvider).
74 void TileLoaded(const TileLoadedFunc &signal);
77 * This method registers a callback function to be invoked when an attempt
78 * to load a map tile has failed.
80 * @param signal A constant reference to a function to be invoked when an
81 * attempt to load a tile has failed; the function accepts a
82 * reference to a <code>TileKey</code> object and a reference to an
83 * object containing information about the error that occurred (an
84 * instance of <code>ErrorBase</code>).
86 void TileFailed(const TileFailedFunc& signal);
89 class GeoTileProviderImpl;
90 std::auto_ptr<GeoTileProviderImpl> m_impl;
93 HERE_MAPS_END_NAMESPACE
95 #endif // GEOTILEPROVIDER_H