Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[core] Add interface to add images to the style - #6375

Merged
tmpsantos merged 2 commits into
masterfrom
tmpsantos-add_icon
Sep 22, 2016
Merged

tmpsantos merged 2 commits into
masterfrom
tmpsantos-add_icon

Conversation

@tmpsantos

Copy link
Copy Markdown
Contributor

Unlike annotations, they will go away when we change the style. This API can also be used to change a sprite downloaded by a style at runtime.

@mention-bot

Copy link
Copy Markdown

@tmpsantos, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh, @1ec5 and @incanus to be potential reviewers.

@tmpsantos tmpsantos added the Core The cross-platform C++ core, aka mbgl label Sep 19, 2016

@jfirebaugh jfirebaugh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to mapbox/mapbox-gl-style-spec#220.

Based on the discussion there, we want to use "image" as an umbrella term that encompasses "icons" (e.g. icon-image) and "patterns" (e.g. background-pattern). Want to start with that naming convention here?

Comment thread include/mbgl/map/map.hpp Outdated
void removeLayer(const std::string& layerID);

// Add icon, bound to the style
void addIcon(const std::string&, std::shared_ptr<const SpriteImage>);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be std::unique_ptr for consistency with addLayer and addSource.

@tmpsantos

Copy link
Copy Markdown
Contributor Author

@jfirebaugh Thanks for reviewing. Changes made.

Want to start with that naming convention here?

Makes sense.

@brunoabinader brunoabinader changed the title [core] Add interface to add sprites to the style [core] Add interface to add images to the style Sep 22, 2016
@tmpsantos
tmpsantos merged commit 4d3356d into master Sep 22, 2016
@tmpsantos
tmpsantos deleted the tmpsantos-add_icon branch September 22, 2016 20:48
@1ec5

1ec5 commented Sep 22, 2016 •

Copy link
Copy Markdown
Contributor

Tracking iOS/macOS support for style image management in #6436. #6434 covers Qt.

/cc @zugaldia

@zugaldia

Copy link
Copy Markdown
Member

@1ec5 Thanks for the heads up. Android's work in now tracked in #6459.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Core The cross-platform C++ core, aka mbgl

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants