[Fully open-source] Baidu map Web service api c #. NET with map display controls, navigation controls, and POI search controls,

Source: Internet
Author: User

[Go] [completely open-source] Baidu map Web service api c #. NET, with map display controls, navigation controls, and POI search controls,

[Go] [completely open-source] Baidu map Web service api c #. NET, with map display controls, navigation controls, and POI search controls

Directory

  • Overview
  • Function
  • How to Use
  • Reference help

 

Overview

The source code mainly contains three projects: BMap. NET, BMap. NET. WindowsForm, and BMap. NET. WinformDemo.

  • BMap. NET

Some encapsulation of Baidu map Web Service APIs, each of which returns the JObject type (see Json. NET );

  • BMap. NET. WindowsForm(I started to write less than one second, but I never changed it later)

Provides a series of controls that can be used in Winform, including Map Display controls, navigation controls, and POI search controls;

  • BMap. NET. WinfromDemo

A simple Demo demonstrates how to use various controls.

This project is fully based on C #. NET and does not use JavaScript or other scripts. All Wheels are hand-built.

Github address

1. Search input box with prompt

2. location query

3. Navigation

4. Add tags and drawings

5. Regional search

6. fast switch between cities

 

Function

BMap. NET provides the following functions:

  • POI search
  • Recommended location
  • Geographic (inverse) Encoding
  • Navigation (bus, driving, and walking)
  • IP location
  • Coordinate Transformation (mocato, GPS, Mars, Baidu coordinates)

BMap. NET. WindowsForm contains the following functions:

  • Map Display (drag, scale, and other basic operations)
  • Select map mode (satellite, common, Road Network)
  • Set map loading mode (local, local, server)
  • Plotting
  • Distance Measurement
  • Add Tag
  • Position input search control
  • Navigation controls
  • Location list control

Does not include the following features:

  • 3D Map
  • Street View
  • Navigation does not consider real-time traffic information (or the departure time of the first and last bus)

In addition, this project only targets Baidu maps, so it is very poor in scalability and far from GMap. NET. However, you can modify the code to meet your requirements.

 

How to Use

BMap. NET is easy to use. Every interface returns the JObject type (representing a json data.

BMap. NET. WindowsForm only contains five controls: BPlaceBox, BMapControl, BPlacesBoard, BDirectionBoard, and BTabControl. During use, you only need to drag it into the Form Designer, and then set their attributes to associate them with each other:

1. BPlaceBox attribute settings

2. BMapControl attribute settings

3. BPlacesBoard attribute settings

4. bdireboard board attribute settings

Then press F5 to run it without writing any code.

Note that the BTabControl control is only used to simulate the Tab effect on the left side of the Baidu map official website and organizes the BPlacesBoard and bdireboard board controls.

 

Reference help

1. Baidu map API documentation

2. Json. NET

3. Json Visualization

 

Note:

1) This article only briefly introduces some general content of this project and will introduce several key technologies, such as Baidu Coordinate Transformation and Baidu map tile row and column number calculation (Baidu map is different from other maps). If you need it, you can follow this blog.

2) I know several bugs in the project. I am worried that the previously written functions cannot be used due to the upgrade of Baidu map API, so I am eager to complete the first version. I will continue to improve the project.

Note: This project and all its source code comply with the MIT open source protocol. If you think it is helpful, you can give a thumbs up. Open source is helpful.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.