This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use array of structs rather than parallel arrays for annotations
- Loading branch information
1 parent
f675d23
commit 42c06e7
Showing
8 changed files
with
179 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef MBGL_ANNOTATION_POINT_ANNOTATION | ||
#define MBGL_ANNOTATION_POINT_ANNOTATION | ||
|
||
#include <mbgl/util/geo.hpp> | ||
|
||
#include <string> | ||
|
||
namespace mbgl { | ||
|
||
class PointAnnotation { | ||
public: | ||
inline PointAnnotation(const LatLng& position_, const std::string& icon_ = "") | ||
This comment has been minimized.
Sorry, something went wrong. |
||
: position(position_), icon(icon_) { | ||
} | ||
|
||
const LatLng position; | ||
const std::string icon; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef MBGL_ANNOTATION_SHAPE_ANNOTATION | ||
#define MBGL_ANNOTATION_SHAPE_ANNOTATION | ||
|
||
#include <mbgl/util/geo.hpp> | ||
#include <mbgl/map/map.hpp> | ||
#include <mbgl/style/style_properties.hpp> | ||
|
||
#include <string> | ||
|
||
namespace mbgl { | ||
|
||
class ShapeAnnotation { | ||
public: | ||
inline ShapeAnnotation(const AnnotationSegments& segments_, const StyleProperties& styleProperties_) | ||
: segments(segments_), styleProperties(styleProperties_) { | ||
} | ||
|
||
const AnnotationSegments segments; | ||
const StyleProperties styleProperties; | ||
}; | ||
|
||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
What if we had
icon_ = "default_marker"
so that a marker gets drawn by default?