MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




New to Mappoint...Qustions on Lat/Long

This is a discussion on New to Mappoint...Qustions on Lat/Long within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-25-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 02-25-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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 ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 02-25-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 02-26-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 02-28-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Lat/Long...question...

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

Thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 02-28-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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();
            }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 02-28-2005
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
Lat/Long

Thanks very much...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
lat or long, mappointqustions


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 05:00 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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