diff options
author | vng <viktor.govako@gmail.com> | 2013-01-03 20:14:14 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:48:18 +0300 |
commit | 182f784678230bbd3238ed4d7d4e19ad9623ed6c (patch) | |
tree | 7daa5c728a1e64543d6ed814f0b1e3e9af511f6b /map/bookmark.cpp | |
parent | 161a93dd3104a43e024172214654c84caacb2c6c (diff) |
Set default pin-color if no any "styleUrl" in kml.
Diffstat (limited to 'map/bookmark.cpp')
-rw-r--r-- | map/bookmark.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/map/bookmark.cpp b/map/bookmark.cpp index 8761f7d69d..2d8febae2c 100644 --- a/map/bookmark.cpp +++ b/map/bookmark.cpp @@ -166,13 +166,20 @@ namespace bookmark_impl } bool MakeValid() - { + { if (MercatorBounds::ValidX(m_org.x) && MercatorBounds::ValidY(m_org.y)) { + // set default name if (m_name.empty()) m_name = PointToString(m_org); + + // set default pin + if (m_type.empty()) + m_type = "placemark-red"; + return true; } + return false; } |