Revert "use array of structs rather than parallel arrays for annotations"

This reverts commit 2435c1ad26 (#1710), which needs to be revisited in light of #1655, which is a much higher priority at the moment.
This commit is contained in:
Minh Nguyễn
2015-06-15 15:58:22 -07:00
parent a08bcb6d0e
commit 714b68f7b3
7 changed files with 28 additions and 45 deletions

View File

@@ -235,12 +235,12 @@ double Map::getTopOffsetPixelsForAnnotationSymbol(const std::string& symbol) {
return context->invokeSync<double>(&MapContext::getTopOffsetPixelsForAnnotationSymbol, symbol);
}
uint32_t Map::addPointAnnotation(const PointAnnotation& annotation) {
return addPointAnnotations({ annotation }).front();
uint32_t Map::addPointAnnotation(const LatLng& point, const std::string& symbol) {
return addPointAnnotations({ point }, { symbol }).front();
}
std::vector<uint32_t> Map::addPointAnnotations(const std::vector<PointAnnotation>& annotations) {
auto result = data->annotationManager.addPointAnnotations(annotations, *data);
std::vector<uint32_t> Map::addPointAnnotations(const std::vector<LatLng>& points, const std::vector<std::string>& symbols) {
auto result = data->annotationManager.addPointAnnotations(points, symbols, *data);
context->invoke(&MapContext::updateAnnotationTiles, result.first);
return result.second;
}