If you are familiar with ASP. net MVC. net MVC, you can quickly integrate map applications or perform secondary development related to maps. You can use Bing Maps API for Ajax for development. On codeplex, an open-source project mvcmaps is released, specifically for ASP. the net MVC project is provided by developing Bing Maps applications. You can access http://mvcmaps.codeplex.com/to find the project.
Creating Bing maps using this project is very simple and convenient in ASP. net mvc. First, define the basic style for map using the CSS style:
. Bingmap
{
Width: 600px;
Height: 400px;
Border: solid 1px black;
}
Then, through the MVC interface provided by mvcmaps, you can easily create a map:
<%
Ajax. bingmap () // create a map
. Cssclass ("bingmap") // you can specify the default map style.
. Render (); // render the map to the HTML end.
%>
Mvcmaps encapsulates and provides all the development interfaces of Bing Maps API for Ajax, such as support for ry, drawing, and polygon.
<%
Ajax. bingmap (). cssclass ("bingmap ")
. Addpushpin (New pushpin (39.9097362345372,-97.470703125, "title", "Description "))
%>
Open Source Project address: http://mvcmaps.codeplex.com/
Other related resources: http://pietschsoft.com/post/2009/11/02/MvcMaps-Preview-1-e28093-A-Unified-BingGoogle-Maps-API-for-ASPNET-MVC.aspx
Copyright description
This article is an original article. You are welcome to repost it and indicate the source of the Article. Its copyright belongs to the author and the blog Park.
Author: beniao
Article Source: http://beniao.cnblogs.com/or http://www.cnblogs.com/