mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 22:46:58 +00:00
Fixed WMS feature info request
This commit is contained in:
parent
c17cbe297f
commit
91f1960a00
6 changed files with 34 additions and 63 deletions
|
|
@ -171,14 +171,14 @@ namespace MapControl
|
|||
|
||||
private void DrawCylindricalGraticule(PathFigureCollection figures, List<Label> labels)
|
||||
{
|
||||
var bounds = ParentMap.GeoBounds;
|
||||
var latLabelStart = Math.Ceiling(bounds.South / lineDistance) * lineDistance;
|
||||
var lonLabelStart = Math.Ceiling(bounds.West / lineDistance) * lineDistance;
|
||||
var boundingBox = ParentMap.ViewRectToBoundingBox(0d, 0d, ParentMap.ActualWidth, ParentMap.ActualHeight);
|
||||
var latLabelStart = Math.Ceiling(boundingBox.South / lineDistance) * lineDistance;
|
||||
var lonLabelStart = Math.Ceiling(boundingBox.West / lineDistance) * lineDistance;
|
||||
|
||||
for (var lat = latLabelStart; lat <= bounds.North; lat += lineDistance)
|
||||
for (var lat = latLabelStart; lat <= boundingBox.North; lat += lineDistance)
|
||||
{
|
||||
var p1 = ParentMap.LocationToView(lat, bounds.West);
|
||||
var p2 = ParentMap.LocationToView(lat, bounds.East);
|
||||
var p1 = ParentMap.LocationToView(lat, boundingBox.West);
|
||||
var p2 = ParentMap.LocationToView(lat, boundingBox.East);
|
||||
|
||||
if (p1.HasValue && p2.HasValue)
|
||||
{
|
||||
|
|
@ -186,17 +186,17 @@ namespace MapControl
|
|||
}
|
||||
}
|
||||
|
||||
for (var lon = lonLabelStart; lon <= bounds.East; lon += lineDistance)
|
||||
for (var lon = lonLabelStart; lon <= boundingBox.East; lon += lineDistance)
|
||||
{
|
||||
var p1 = ParentMap.LocationToView(bounds.South, lon);
|
||||
var p2 = ParentMap.LocationToView(bounds.North, lon);
|
||||
var p1 = ParentMap.LocationToView(boundingBox.South, lon);
|
||||
var p2 = ParentMap.LocationToView(boundingBox.North, lon);
|
||||
|
||||
if (p1.HasValue && p2.HasValue)
|
||||
{
|
||||
figures.Add(CreateLineFigure(p1.Value, p2.Value));
|
||||
}
|
||||
|
||||
for (var lat = latLabelStart; lat <= bounds.North; lat += lineDistance)
|
||||
for (var lat = latLabelStart; lat <= boundingBox.North; lat += lineDistance)
|
||||
{
|
||||
var position = ParentMap.LocationToView(lat, lon);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue