I have a map with multiple pushpins, when the map loads the
MapPoint logo is covering one of the pushpins making it nearly impossible to
see.
Can anyone provide a solution to overcome points hidden by the mappiont logo?
This is a discussion on MapPoint logo obscuring pushpin within the MapPoint Desktop Discussion forums, part of the Map Forums category; I have a map with multiple pushpins, when the map loads the MapPoint logo is covering one of the pushpins ...
I have a map with multiple pushpins, when the map loads the
MapPoint logo is covering one of the pushpins making it nearly impossible to
see.
Can anyone provide a solution to overcome points hidden by the mappiont logo?
I see Steven Pushee suggested some code to back the map out a little..:
Hello,
Are you passing the mapview as ViewByBoundingLocations? This builds a map that fits all the locations on the map with a little buffer on the edges
but doesn't worry about the logo. What you could do is build the map view (ViewByBoundingRectangle) yourself based on the lat/longs and just add a bigger buffer.
Here's a little routine that I use to build a map view, this one adds a 10% buffer but you could bounce that out a little.
Steven PusheeCode:Public Overloads Shared Function GetMapView(ByVal CenterPoint As LatLong, ByVal ProximityResults As FindResults) As ViewByBoundingRectangle Try Dim HighLat As Double Dim LowLat As Double Dim HighLong As Double Dim LowLong As Double ' Set the limits to the centerpoint HighLat = CenterPoint.Latitude LowLat = CenterPoint.Latitude HighLong = CenterPoint.Longitude LowLong = CenterPoint.Longitude ' Loop through results Dim myLocation As FindResult For Each myLocation In ProximityResults.Results If myLocation.FoundLocation.LatLong.Latitude > HighLat Then HighLat = myLocation.FoundLocation.LatLong.Latitude ElseIf myLocation.FoundLocation.LatLong.Latitude < LowLat Then LowLat = myLocation.FoundLocation.LatLong.Latitude End If If myLocation.FoundLocation.LatLong.Longitude > HighLong Then HighLong = myLocation.FoundLocation.LatLong.Longitude ElseIf myLocation.FoundLocation.LatLong.Longitude < LowLong Then LowLong = myLocation.FoundLocation.LatLong.Longitude End If Next ' Add 10% on each side Dim LatBuffer As Double = ((Math.Abs(HighLat - LowLat)) * 0.1) Dim LongBuffer As Double = ((Math.Abs(HighLong - LowLong)) * 0.1) ' Set the mapview Dim myMapView(0) As ViewByBoundingRectangle myMapView(0) = New ViewByBoundingRectangle myMapView(0).BoundingRectangle = New LatLongRectangle myMapView(0).BoundingRectangle.Northeast = New LatLong myMapView(0).BoundingRectangle.Southwest = New LatLong myMapView(0).BoundingRectangle.Northeast.Latitude = (HighLat + LatBuffer) myMapView(0).BoundingRectangle.Northeast.Longitude = (HighLong - LongBuffer) myMapView(0).BoundingRectangle.Southwest.Latitude = (LowLat - LatBuffer) myMapView(0).BoundingRectangle.Southwest.Longitude = (LowLong + LongBuffer) Return myMapView(0) Catch ex As Exception Throw End Try End Function
~ Order MapPoint MapPoint 2013 Here and Get Free Access to the MapForums Downloads ~
~~
~ Upgrade to Get Access to the MapForums Downloads ~
There are currently 1 users browsing this thread. (0 members and 1 guests)