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

Commit

Permalink
set some styling properties on the annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
incanus committed Feb 25, 2015
1 parent 4d1dbf6 commit 645aeda
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/mbgl/style/style_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ void StyleParser::parse(JSVal document) {

// "parse" paints
std::map<ClassID, ClassProperties> paints;
paints[ClassID::Default].set(PropertyKey::LineWidth, 3.0);

rapidjson::Document d;

rapidjson::Value lineWidth(rapidjson::kObjectType);
lineWidth.AddMember("line-width", 3.0, d.GetAllocator());
parsePaint(lineWidth, paints[ClassID::Default]);

rapidjson::Value lineColor(rapidjson::kObjectType);
lineColor.AddMember("line-color", "#f00", d.GetAllocator());
parsePaint(lineColor, paints[ClassID::Default]);

util::ptr<StyleLayer> annotations = std::make_shared<StyleLayer>(id, std::move(paints));

// add layer
Expand Down

0 comments on commit 645aeda

Please sign in to comment.