Popular

Obten claves web y navega gratis Router keygen para Android

Error 403 Forbidden con phpmyadmin y WAMP Server

Realizar suma, resta y división con javascript

Agregando líneas rectas "Bing Maps Control WPF".


En algunos casos es posible que desees trazar algunos trazos de línea recta entre dos puntos en un mapa. Una forma de hacerlo se muestra en el siguiente código:


private void PutPoint()
{
//List of Locations
List<Location> locationsList = new List<Location>();
Location locdetail = new Location(21.1869553, -102.88504169999999);
       locationsList.Add(locdetail);
       locdetail = new Location(21.8815453, -102.29124539999998);
       locationsList.Add(locdetail);
       //Center location in map
       myMap.Center = locdetail;
       myMap.ZoomLevel = 8;
       //Line configuration
       MapPolyline line = new MapPolyline();
       line.Stroke = new SolidColorBrush(Colors.Blue);
       line.StrokeThickness = 3.0;
       line.Locations = new LocationCollection();
       //Add locations
       foreach (Location loc in locationsList)
       {
             Pushpin pin = new Pushpin();
             pin.Location = loc;
myMap.Children.Add(pin);

line.Locations.Add(loc);
}

//Draw line
myMap.Children.Add(line);    
}






Comentarios

Entradas populares de este blog

Error 403 Forbidden con phpmyadmin y WAMP Server

Número de filas afectadas por instrucción PL/SQL en Oracle [Utilidades].

Como truncar un número decimal en C# sin redondear.