Tag Archives: map

Drag a map to scroll in C#

This example shows how you can allow a user to drag a map to scroll to hidden parts of it. Scroll bars provide a simple method for allowing the user to view parts of a map that don’t fit on … Continue reading

Posted in drawing, graphics, image processing, mathematics | Tagged , , , , , , , , , , , , , , , | 3 Comments

Define map hotspots in C#

The example Display a scalable map with hotspots in C# uses a list of hotspots defined by the following code. // The hotspots. private List Hotspots = new List(); … // Prepare the map for first viewing. private void Form1_Load(object … Continue reading

Posted in algorithms, graphics, mathematics | Tagged , , , , , , , , , , , , , | Leave a comment

Display a scalable map with hotspots in C#

Making a scalable map with hotspots is surprisingly easy, although getting the details right is a bit tricky. The program displays a map at several different scales. If the map won’t fit on the form at the current scale, it … Continue reading

Posted in algorithms, graphics, mathematics | Tagged , , , , , , , , , , , , , | 5 Comments

Display map distance with limited significant digits in C#

The post Measure distance on a map with a scale in C# lets you measure a distance on a map. However, it displays too many significant digits in the results to look nice. For example, the sample picture displays the … Continue reading

Posted in algorithms, extension methods, graphics, mathematics, strings | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Measure distance on a map with a scale in C#

Recently I wanted to measure the distance around my local park. If you look at Google Maps, you can find maps of just about anywhere with the scale shown on them. This application lets you load such a map, use … Continue reading

Posted in algorithms, drawing, graphics, image processing | Tagged , , , , , , , , , , , , , | 1 Comment

Map points between coordinate systems in C#

This example shows how you can easily map points between different coordinate systems. The Graphics object provides transformations that let you scale, translate, rotate, skew, and otherwise transform graphics as you draw them. One important use of these transformations is … Continue reading

Posted in algorithms, drawing, graphics, transformations | Tagged , , , , , , , , , , , , , , , , , , | 3 Comments