Introducing the Microsoft Virtual Earth Silverlight Map Control CTP

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    Introducing the Microsoft Virtual Earth Silverlight Map Control CTP - Presentation Transcript

    1. Paper Maps
    2. Digital Maps
    3. Digital Static Maps
    4. AJAX Maps
    5. Flash Maps
    6. Silverlight Maps
    7. Navigating the Map
    8. How data flows
    9. How data flows
    10. Leveraging XAML – Get A Map
    11. Leveraging XAML – Get A Map <UserControl x:Class=\"VirtualEarthSilverlight.Page\" xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentat ion\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:m=\"clr- namespace:Microsoft.VirtualEarth.MapControl;assembly=Micro soft.VirtualEarth.MapControl\"> <Grid x:Name=\"LayoutRoot\" Background=\"White\"> <m:Map/> </Grid> </UserControl>
    12. Leveraging XAML – Get A Map xmlns:m=\"clr- namespace:Microsoft.VirtualEarth.MapControl;assembly=Micro soft.VirtualEarth.MapControl\" <m:Map/>
    13. Leveraging XAML – Configuring the Mapplication
    14. Leveraging XAML – Configuring the Mapplication <UserControl x:Class=\"VirtualEarthSilverlight.Page“ xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presen tation\" xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\" xmlns:m=\"clr- namespace:Microsoft.VirtualEarth.MapControl;assembly=Micro soft.VirtualEarth.MapControl\"> <Grid x:Name=\"LayoutRoot\" Background=\"White\"> <m:Map Center=\"36.12154022795178, - 115.16997814178468\" Mode=\"AerialWithLabels\" NavigationVisibility=\"Visible\" ZoomLevel=\"17\" /> </Grid> </UserControl>
    15. Leveraging XAML – Configuring the Mapplication xmlns:m=\"clr- namespace:Microsoft.VirtualEarth.MapControl;assembly=Micro soft.VirtualEarth.MapControl\"> <m:Map Center=\"36.12154022795178, - 115.16997814178468\" Mode=\"AerialWithLabels\" NavigationVisibility=\"Visible\" ZoomLevel=\"17\" />
    16. Leveraging C# – Adding Data to the Map
    17. Leveraging C# – Adding Data to the Map <m:Map HorizontalAlignment=\"Stretch\" VerticalAlignment=\"Stretch\" x:Name=\"MyMap\" Grid.Column=\"1\" Grid.Row=\"0\"> <m:Map.Children> <m:MapLayer x:Name=\"MyLayer\"> <m:MapPolygon Fill=\"Blue\" Stroke=\"Green\" StrokeThickness=\"5\" Locations=\"20,-20 20,20 -20,20 -20,- 20\" Opacity=\"0.7\" /> </m:MapLayer> </m:Map.Children> </m:Map>
    18. Leveraging C# – Adding Data to the Map LocationCollection points = GetPoints(pointsCount, centerX, centerY); MapPolygon shape = new MapPolygon(); shape.Locations = points; shape.StrokeThickness = thickness; shape.Stroke = new SolidColorBrush(color); shape.Fill = new SolidColorBrush(fillColor); MyLayer.Children.Add(shape);
    19. Leveraging C# – Adding Data to the Map double width = MyMap.ViewportSize.Width * 0.1; LocationCollection points = new LocationCollection(); for (int i = 0; i < count; i++) { double j = (double)i / (double)count; points.Add(MyMap.ViewportPointToLocation( new Point(centerX + Math.Cos(j * 2.0 * Math.PI) * width, centerY + Math.Sin(j * 2.0 * Math.PI) * width))); } return points;
    20. Leveraging C# – Adding Data to the Map
    21. Leveraging C# – Adding Data to the Map
    22. Leveraging C# – Adding Data to the Map
    23. Leveraging C# – Adding Media to the Map
    24. Leveraging C# – Adding Media to the Map <m:Map x:Name=\"myMap\" Grid.Column=\"0\" Grid.Row=\"0\" Mode=\"AerialWithLabels\"> <m:Map.Children> <m:MapLayer x:Name=\"myMapLayer\"> </m:MapLayer> </m:Map.Children> </m:Map>
    25. Leveraging C# – Adding Media to the Map private void ChangeMapView(object sender, RoutedEventArgs e) { myMap.View (MapViewSpecification)mapSpecConverter.ConvertFrom(((Butto n)sender).Tag); pushpin = CreateUIElement(); Location pinLocation = myMap.TargetView.Center; PositionMethod position = PositionMethod.Center; myMapLayer.AddChild(pushpin, pinLocation, position); }
    26. Leveraging C# – Adding Media to the Map //Image Brush ImageBrush imagebrush = new ImageBrush(); imagebrush.AlignmentX = AlignmentX.Center; imagebrush.AlignmentY = AlignmentY.Center; imagebrush.ImageSource = new BitmapImage(new Uri(@\"Chris Pendleton.jpg\", UriKind.Relative)); imagebrush.Opacity = 1;
    27. Leveraging C# – Adding Media to the Map Ellipse ellipse = new Ellipse(); ellipse.Fill = new SolidColorBrush(Colors.Cyan); ellipse.Opacity = .9; ellipse.Stroke = new SolidColorBrush(Colors.Black); ellipse.Height = 100.00; ellipse.Width = 100.00; Border border = new Border(); border.BorderBrush = new SolidColorBrush(Colors.Black); border.BorderThickness = new Thickness(0); border.Child = ellipse; return border;
    28. Leveraging C# – Adding Media to the Map
    29. Leveraging C# – Accessing Virtual Earth WS
    30. Leveraging C# – Accessing Virtual Earth WS private int geocodesInProgress; private PlatformServices.GeocodeServiceClient geocodeClient; private PlatformServices.GeocodeServiceClient GeocodeClient{ get{ if (null == geocodeClient){ //Handle http/https bool httpsUriScheme = HtmlPage.Document.DocumentUri.Scheme.Equals(Uri.UriSchemeHttps); BasicHttpBinding binding = httpsUriScheme ? new BasicHttpBinding(BasicHttpSecurityMode.Transport) : new BasicHttpBinding(BasicHttpSecurityMode.None); UriBuilder serviceUri = new UriBuilder(\"http://dev.virtualearth.net/webservices/v1/GeocodeService/Geoc odeService.svc\"); //Create the Service Client geocodeClient = new PlatformServices.GeocodeServiceClient(binding, new EndpointAddress(serviceUri.Uri)); geocodeClient.GeocodeCompleted += new EventHandler<PlatformServices.GeocodeCompletedEventArgs>(client_GeocodeCom pleted); } return geocodeClient; } }
    31. Leveraging C# – Accessing Virtual Earth WS private void GeocodeAddress(string address){ PlatformServices.GeocodeRequest request = new PlatformServices.GeocodeRequest(); request.Culture = MyMap.Culture; request.Query = address; request.ExecutionOptions = new PlatformServices.ExecutionOptions(); request.ExecutionOptions.SuppressFaults = true; request.Credentials = PlatformServicesHelper.GetCredentials(); request.Options = new PlatformServices.GeocodeOptions(); // Using ObservableCollection since this is the default for Silverlight proxy generation. request.Options.Filters = new ObservableCollection<PlatformServices.FilterBase>(); PlatformServices.ConfidenceFilter filter = new PlatformServices.ConfidenceFilter(); filter.MinimumConfidence = PlatformServices.Confidence.High; request.Options.Filters.Add(filter); Output.Text = \"< geocoding \" + address + \" >\"; geocodesInProgress++; // Make asynchronous call to fetch the data ... pass state object. GeocodeClient.GeocodeAsync(request, address); }
    32. Leveraging C# – Accessing Virtual Earth WS /* Demonstrate Microsoft Virtual Earth Silverlight Interactive SDK */ //demo
    33. Your feedback is important!

    + goodfridaygoodfriday, 8 months ago

    custom

    1729 views, 0 favs, 2 embeds more stats

    Come see the new Virtual Earth Silverlight Map Cont more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1729
      • 1716 on SlideShare
      • 13 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 10
    Most viewed embeds
    • 10 views on http://www.p-gis.com
    • 3 views on http://p-gis.blogspot.com

    more

    All embeds
    • 10 views on http://www.p-gis.com
    • 3 views on http://p-gis.blogspot.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories