本文整理汇总了C++中MapWindowProjection::GetMapScaleUser方法的典型用法代码示例。如果您正苦于以下问题:C++ MapWindowProjection::GetMapScaleUser方法的具体用法?C++ MapWindowProjection::GetMapScaleUser怎么用?C++ MapWindowProjection::GetMapScaleUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapWindowProjection
的用法示例。
在下文中一共展示了MapWindowProjection::GetMapScaleUser方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateCache
void Topology::updateCache(MapWindowProjection &map_projection,
rectObj thebounds, bool purgeonly) {
if (!triggerUpdateCache) return;
if (!shapefileopen) return;
in_scale = CheckScale(map_projection.GetMapScaleUser());
if (!in_scale) {
// not visible, so flush the cache
// otherwise we waste time on looking up which shapes are in bounds
flushCache();
triggerUpdateCache = false;
return;
}
if (purgeonly) return;
triggerUpdateCache = false;
msSHPWhichShapes(&shpfile, thebounds, 0);
if (!shpfile.status) {
// this happens if entire shape is out of range
// so clear buffer.
flushCache();
return;
}
shapes_visible_count = 0;
for (int i=0; i<shpfile.numshapes; i++) {
if (msGetBit(shpfile.status, i)) {
if (shpCache[i]==NULL) {
// shape is now in range, and wasn't before
shpCache[i] = addShape(i);
}
shapes_visible_count++;
} else {
removeShape(i);
}
}
}
示例2: TriggerIfScaleNowVisible
void Topology::TriggerIfScaleNowVisible(MapWindowProjection &map_projection) {
triggerUpdateCache |= (CheckScale(map_projection.GetMapScaleUser()) != in_scale);
}