Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 2 of 2

Creating a map with multiple pushpins

This is a discussion on Creating a map with multiple pushpins within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hello everyone, I am new to MapPoint.NET and am having a problem. I am trying to display a map with ...

  1. #1
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137

    Creating a map with multiple pushpins

    Hello everyone,

    I am new to MapPoint.NET and am having a problem. I am trying to display a map with a static location, e.g. "You Are Here", with pushpins to one or more locations within a radius of the static location found using a call to the FindNearby function. I have only been able to create a map with one pushpin for one location, so far. Thanks, in advance, for any and all assistance anyone can give me.

    Sincerely,
    Mike

  2. #2
    Anonymous is offline Senior Member Black Belt
    Join Date
    Jul 2002
    Posts
    5,137
    Hello,

    You can pass up to 100 pushpins in the pushpins property(array) of the mapspecification. Here's the example from the SDK:

    'Route between two locations
    Dim latLongs(1) As LatLong
    latLongs(0) = New LatLong()
    latLongs(1) = New LatLong()
    latLongs(0).Latitude = 40
    latLongs(0).Longitude = -120
    latLongs(1).Latitude = 41
    latLongs(1).Longitude = -121

    Dim myRoute As Route
    myRoute = routeService.CalculateSimpleRoute(latLongs, "MapPoint.NA", SegmentPreference.Quickest)

    'Get a map of the route and add pushpins to the start and end
    Dim myRouteViews(0) As ViewByHeightWidth
    myRouteViews(0) = myRoute.Itinerary.View.ByHeightWidth

    Dim myPushpins(1) As Pushpin
    myPushpins(0) = New Pushpin()
    myPushpins(0).IconDataSource = "MapPoint.Icons"
    myPushpins(0).IconName = "31"
    myPushpins(0).Label = "Start"
    myPushpins(0).LatLong = myRoute.Itinerary.Segments(0).Waypoint.Location.La tLong
    myPushpins(1) = New Pushpin()
    myPushpins(1).IconDataSource = "MapPoint.Icons"
    myPushpins(1).IconName = "29"
    myPushpins(1).Label = "End"
    myPushpins(1).LatLong = myRoute.Itinerary.Segments(1).Waypoint.Location.La tLong

    Dim mapSpec As New MapSpecification()
    mapSpec.DataSourceName = "MapPoint.NA"
    mapSpec.Route = myRoute
    mapSpec.Pushpins = myPushpins
    mapSpec.Views = myRouteViews

    Dim myMaps() As MapImage
    myMaps = renderService.GetMap(mapSpec)



    Steven Pushee

    This posting is provided "AS IS" with no warranties, and confers no rights.
    You assume all risk for your use. 2003 Microsoft Corporation. All rights
    reserved.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. creating radii based on highest concentration of pushpins
    By tvsmvp in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-31-2006, 06:10 AM
  2. Creating a subset of Pushpins from a set of pushpins
    By paf33 in forum MapPoint Desktop Discussion
    Replies: 3
    Last Post: 08-09-2005, 05:54 AM
  3. Multiple Pushpins for One Address, Possible?
    By Jeff Nelson in forum MapPoint Desktop Discussion
    Replies: 6
    Last Post: 05-31-2005, 04:20 PM
  4. creating multiple points (pushpins) on a map...
    By mjschukas in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 05-10-2005, 10:58 AM
  5. Multiple Pushpins
    By LThomas999 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 04-01-2003, 06:14 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96