Community of VE/MapPoint Users and Developers
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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
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 MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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 |
| |||
|
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 MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| lat or long, mappointqustions |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| 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 |