From 10a30daed66ac1795ee9a0097e8aeb2e735e8968 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Tue, 24 Mar 2015 18:43:24 -0700 Subject: refs #894, fixes #1074: callout views for iOS --- src/mbgl/map/map.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 points({ point }); -- cgit v1.2.1