Exemple #1
0
 /// <summary>
 /// An event handler called when a marker emphasis has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnMarkerEmphasisChanged(object sender, MapMarkerChangedEventArgs e)
 {
     // If the marker is emphasized.
     if (e.Marker.Emphasized)
     {
         // If the markers are shown.
         if (this.showMarkers)
         {
             // Show the info annotation.
             this.OnShowAnnotation(this.annotationInfo, e.Marker.Name, e.Marker);
         }
         // Set the emphasized marker.
         this.emphasizedMarker = e.Marker;
     }
     else
     {
         // If there is a highlighted marker.
         if ((null != this.highlightMarker) && this.showMarkers)
         {
             // Show the info annotation.
             this.OnShowAnnotation(this.annotationInfo, this.highlightMarker.Name, this.highlightMarker);
         }
         // If there is a highlighted region.
         else if (null != this.highlightRegion)
         {
             // Show the info annotation.
             this.OnShowAnnotation(this.annotationInfo, this.highlightRegion.Name, this.highlightRegion);
         }
         else
         {
             // Hide the info annotation.
             this.OnHideAnnotation(this.annotationInfo);
         }
         // Set the emphasized marker.
         this.emphasizedMarker = null;
     }
     // Refresh the marker.
     this.Invalidate(e.Marker.Bounds.Add(this.bitmapLocation));
 }
Exemple #2
0
 /// <summary>
 /// An event handler called when a marker size has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnMarkerSizeChanged(object sender, MapMarkerChangedEventArgs e)
 {
     // Refresh the marker.
     this.Invalidate(e.Marker.Bounds.Add(this.bitmapLocation));
     // Update the marker.
     e.Marker.Update(this.mapBounds, this.mapScale);
     // Refresh the marker.
     this.Invalidate(e.Marker.Bounds.Add(this.bitmapLocation));
 }
Exemple #3
0
 /// <summary>
 /// An event handler called when a marker color has changed.
 /// </summary>
 /// <param name="sender">The sender object.</param>
 /// <param name="e">The event arguments.</param>
 private void OnMarkerColorChanged(object sender, MapMarkerChangedEventArgs e)
 {
     // Refresh the marker.
     this.Invalidate(e.Marker.Bounds.Add(this.bitmapLocation));
 }