diff options
author | Darafei Praliaskouski <komzpa@gmail.com> | 2013-01-16 15:10:13 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:48:48 +0300 |
commit | 5b9c941d98748f63f52e29a7744103d960ef6188 (patch) | |
tree | 5821a427ca97ac1c327cc526c05f5c903ea47788 | |
parent | c94139ba2883d1baada383418b4e14c59e790eaa (diff) |
get area only for lines and polygons
-rw-r--r-- | map/feature_styler.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/map/feature_styler.cpp b/map/feature_styler.cpp index bb1a8c8306..2f2426dc4d 100644 --- a/map/feature_styler.cpp +++ b/map/feature_styler.cpp @@ -58,8 +58,13 @@ namespace feature m_primaryText.clear(); } - m2::RectD const bbox = f.GetLimitRect(zoom); - double const area = bbox.SizeX() * bbox.SizeY(); + double area = 0.0; + if (m_geometryType != GEOM_POINT) + { + m2::RectD const bbox = f.GetLimitRect(zoom); + area = bbox.SizeX() * bbox.SizeY(); + } + double priorityModifier; if (area != 0) @@ -88,7 +93,9 @@ namespace feature if ((keys[i].m_type == drule::caption) || (keys[i].m_type == drule::symbol) - || (keys[i].m_type == drule::circle)) + || (keys[i].m_type == drule::circle) + || (keys[i].m_type == drule::pathtext) + || (keys[i].m_type == drule::waymarker)) { // show labels of larger objects first depth += priorityModifier; |