Book Image

Leaflet.js Essentials

Book Image

Leaflet.js Essentials

Overview of this book

Table of Contents (13 chapters)
Leaflet.js Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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 http://www.visualstudio.com/downloads/download-visual-studio-vs. 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...