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 7 of 7

New to Mappoint...Qustions on Lat/Long

This is a discussion on New to Mappoint...Qustions on Lat/Long within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am developing a store locator using map point. I have lat/long for a place. How do I calculate lat/long ...

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

    New to Mappoint...Qustions on Lat/Long

    I am developing a store locator using map point. I have lat/long for a place. How do I calculate lat/long for places
    within 10 mile radius ?

    Thanks in advance

    PCaltair

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Can you clarify a little bit what you wants to do? Do you mean you want to calculate all poossible lat/long within a radius with a given interval / distance? Or do you mean to check if a given other place is within the radius ?

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

    Lat/long

    I have a database with store IDs/lat/long. I know my starting lat/long. I want get a list of stores from the database within a radius of 10 miles from the starting point and show them as pushpins on the mappoint map

    Thanks

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Add all stores, then draw a shape. to find all the stores withing the shape use QueryShape. This returns a Recordset containing all stores within the Shape.

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

    Lat/Long...question...

    Thanks for the reply.Is there an example which I can look at ?

    Thanks in advance.

  6. #6
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    This should get you started:

    Code:
                int Count = 30;
                Location Loc;
                Pushpin PP;
                Double Lat = 50;
                Double Lon = -3;
                Double Alt = 1000;
    
                // First we create all our stores
                while (Count-- > 0) {
                    Lon += 0.5;
                    Loc = MP.ActiveMap.GetLocation(Lat, Lon, Alt);
                    PP = MP.ActiveMap.AddPushpin(Loc, Count.ToString());
                    PP.Symbol = 1;
                }
                MP.ActiveMap.DataSets.ZoomTo();
    
                // we make a circular area
                Loc = MP.ActiveMap.GetLocation(Lat, Lon, Alt);
                Shape area = MP.ActiveMap.Shapes.AddShape(GeoAutoShapeType.geoShapeRadius, Loc, 300, 300);
    
                // Now we list all pushpin in the area an highlight them
                object o = 1;
                Recordset stores = MP.ActiveMap.DataSets.get_Item(ref o).QueryShape(area);
                stores.MoveFirst();
                while (!stores.EOF) {
                    Console.WriteLine(stores.Pushpin.Name.ToString());
                    stores.Pushpin.Highlight = true;
                    stores.MoveNext();
                }

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

    Lat/Long

    Thanks very much...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Getting the lat/long from MapPoint ActiveX
    By ranton05 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 02-27-2005, 12:06 PM
  2. Returning your Lat/Long in mappoint
    By Anonymous in forum MP2K Magazine Articles
    Replies: 1
    Last Post: 02-01-2005, 07:54 PM
  3. Access/Mappoint Lat and Long
    By Rudi in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-08-2004, 05:42 AM
  4. Lat/Long in MapPoint 2002
    By Anonymous in forum MP2K Magazine Articles
    Replies: 3
    Last Post: 12-24-2003, 10:21 PM
  5. Another MapPoint Lat/Long Question
    By MarioD in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-04-2002, 06:17 PM

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