Book Image

Leaflet.js Essentials

By : Paul Crickard III, Paul Crickard
Book Image

Leaflet.js Essentials

By: Paul Crickard III, Paul Crickard

Overview of this book

Table of Contents (13 chapters)
Leaflet.js Essentials
About the Author
About the Reviewers

Desktop applications in C# with Leaflet

Leaflet is used in a web page; however, with C#, you can embed a web browser in a Windows form to create what appears to be a desktop application. The examples in this section will show you how to add a map to a C# application, add a point by calling a JavaScript function from C#, and show you how to connect to MongoDB in C# and display the results on the map.

Adding a map to a C# application

To build an application in C#, you will need to install Microsoft Visual Studio Express. You will need at least Visual Studio C# 2010. You can download it at This program is a slimmed-down version of the commercial Visual Studio. It allows you to rapidly build Windows Form Applications and compile your code in to an easily redistributable Windows Executable.

Launch the application and create a new Windows Form Application from the dialog box, as shown in the following screenshot:

Your application will...