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
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 ...
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
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 ?
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
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
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.
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Thanks for the reply.Is there an example which I can look at ?
Thanks in advance.
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(); }
rgds, Wilfried Mestdagh
www.mestdagh.biz
www.comfortsoftware.be
www.expertsoftware.be
MapPoint coding demo
MapPoint 2011 available, buy now
Thanks very much...
There are currently 1 users browsing this thread. (0 members and 1 guests)