diff options
author | Justin R. Miller <incanus@codesorcery.net> | 2015-03-24 18:43:24 -0700 |
---|---|---|
committer | Justin R. Miller <incanus@codesorcery.net> | 2015-03-24 18:43:24 -0700 |
commit | 10a30daed66ac1795ee9a0097e8aeb2e735e8968 (patch) | |
tree | 3c1a050fce8b282cab9eb771d0aa58c2e101387d /src/mbgl/map | |
parent | 3490622dd25cda45ec4d6804de397417e4e8f672 (diff) | |
download | qtlocation-mapboxgl-10a30daed66ac1795ee9a0097e8aeb2e735e8968.tar.gz |
refs #894, fixes #1074: callout views for iOS
Diffstat (limited to 'src/mbgl/map')
-rw-r--r-- | src/mbgl/map/map.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 24f72e8dca..aa56ea1e71 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -545,6 +545,12 @@ void Map::setDefaultPointAnnotationSymbol(const std::string& symbol) { annotationManager->setDefaultPointAnnotationSymbol(symbol); } +double Map::getTopOffsetPixelsForAnnotationSymbol(const std::string& symbol) { + SpritePosition pos = sprite->getSpritePosition(symbol); + + return -pos.height / pos.pixelRatio / 2; +} + uint32_t Map::addPointAnnotation(const LatLng& point, const std::string& symbol) { assert(Environment::currentlyOn(ThreadType::Main)); std::vector<LatLng> points({ point }); |