get area only for lines and polygons

This commit is contained in:
Darafei Praliaskouski 2013-01-16 14:10:13 +03:00 committed by Alex Zolotarev
parent c94139ba28
commit 5b9c941d98

View file

@ -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;