Add test for removeAnnotation
This commit is contained in:
@@ -120,6 +120,22 @@ TEST(Annotations, NonImmediateAdd) {
|
||||
util::write_file("test/output/non_immediate_add.png", renderPNG(map));
|
||||
}
|
||||
|
||||
TEST(Annotations, Remove) {
|
||||
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
||||
HeadlessView view(display, 1);
|
||||
DefaultFileSource fileSource(nullptr);
|
||||
|
||||
Map map(view, fileSource, MapMode::Still);
|
||||
map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"), "");
|
||||
uint32_t point = map.addPointAnnotation(PointAnnotation({ 0, 0 }, "default_marker"));
|
||||
|
||||
renderPNG(map);
|
||||
|
||||
map.removeAnnotation(point);
|
||||
|
||||
util::write_file("test/output/remove.png", renderPNG(map));
|
||||
}
|
||||
|
||||
TEST(Annotations, SwitchStyle) {
|
||||
auto display = std::make_shared<mbgl::HeadlessDisplay>();
|
||||
HeadlessView view(display, 1);
|
||||
|
||||
Reference in New Issue
Block a user