Google maps ist schon was ganz tolles, aber nachdem ich die Maps von Bing auf einiger meiner Seiten implementiert habe, finde ich die Bing Variante fast schon besser wie Google. Was ich schon lange gesucht habe, habe ich nun gefunden. Eine Implementation von Microsofts Bing Map für Asp.net.
Wie das ganze Funktioniert zeige ich euch hier.

Microsoft Bing Maps – Intallation in Asp.net
Installation
- Download der .dll Datei auf http://simplovation.com/page/webmapsve.aspx und in das bin Verzeichnis legen.
- Um nun eine Map zuerstellen muss folgender Code im .ascx oder .aspx eingefügt werden
<%@ Register Assembly=”Simplovation.Web.Maps.VE” Namespace=”Simplovation.Web.Maps.VE” TagPrefix=”Simplovation” %>
<asp:ScriptManager runat=”server” ID=”ScriptManager1″></asp:ScriptManager>
<Simplovation:Map runat=”server” ID=”Map1″ style=”padding-top:50px;” Width=”100%” Height=”450px” CssClass=”map” />
- Nun erscheint bereits eine Bing Map auf der gewünschten Seite.
Funktionen – Code Snippets:
- Ein Fähnchen setzen
LatLong coordinates = new LatLong(46.797064, 11.93);
Shape s = new Shape(coordinates);
s.Title = “Pushpin”;
s.Description = “Added ” + DateTime.Now.ToString();
//s.MoreInfoURL = “~/MorePushpinInfo.aspx”;
s.PhotoURL = “~/images/PushpinImage.png”;
Map1.AddShape(s);
Nun wird ein Fähnchen auf der angegebenen Koordinate angezeigt. Zusätzlich wird ein Dialog mit Title, Description und Bild angezeigt, sobald man über das Fähnchen fährt. Weiters kann mit der Funktion s.MoreInfoUrl eine Url zu weiteren Informationen zu diesem Ort bzw. Betrieb gesetzt werden.
- Ein Polygon zeichnen
Simplovation.Web.Maps.VE.LatLong[] points = new Simplovation.Web.Maps.VE.LatLong[6]
points[0] = new Simplovation.Web.Maps.VE.LatLong(46.1950421086602, -97.03125);
points[1] = new Simplovation.Web.Maps.VE.LatLong(46.0122238406324, -104.326171875);
points[2] = new Simplovation.Web.Maps.VE.LatLong(43.1330611624061, -104.326171875);
points[3] = new Simplovation.Web.Maps.VE.LatLong(42.9403392336318, -96.943359375);
points[4] = new Simplovation.Web.Maps.VE.LatLong(45.2748864370489, -96.767578125);
points[5] = new Simplovation.Web.Maps.VE.LatLong(45.7061792853308, -97.3828125);
Simplovation.Web.Maps.VE.Shape s = new Simplovation.Web.Maps.VE.Shape(Simplovation.Web.Maps.VE.ShapeType.Polygon, points);
s.FillColor = Simplovation.Web.Maps.VE.Color.Red;
s.FillColor.A = 0.5; // make sure the color is semi-transparent
s.LineColor = Simplovation.Web.Maps.VE.Color.Blue;
s.LineWidth = 2; // make the line width 2 pixels
Map1.AddShape(s);
Nun wird ein Polygon anhand der Koordinaten gezeichnet.
- InfoBox verändern
Unter Shape.Description kann ganz einfach ein Html hineingeschrieben werden. Die InfoBox passt sich der größe des HTML in der Description an.