Retrieve Lat/Lon of a ShaddedCircle

rorgmanche
09-08-2005, 08:53 AM
Hi,

I am working on an application under VB.net using the MapPoint API. I have a question: is it possible to retrieve the coordinate of a selected ShaddedCircle ? I have programmaticaly imported data from ".txt" file and have put them on a map with ShaddedCircles. When i select any ShaddedCircle, the lat/lon of is not correct and is always the same. However, when i select another point on the map, like a city for example, the coordinates are correct.
Have someone already succeeded in retrieving Lat/lon of ShaddedCircle ?
:cry:

Best regards,

Winwaed
09-08-2005, 04:00 PM
Kludgy get-around:

Create an invisible pushpin. Then re-import your data but as a pushpin set instead of a shaded circle. Then get the location of the invisible pushpin?

I'm not sure how you'd select the invisible pushpin: can you get a name from the shaded circle? (and then use this name to find the corresponding invisible pushpin)



Richard

rorgmanche
09-09-2005, 07:38 AM
Hi,

I already have test my following routine with pushpin but the result is the same. I never obtain the lat/lon of the symbols put on the map by import, but, with this routine i obtain each time the lat/lon of any point on the map


Private Sub AxMappointControl1_SelectionChange(ByVal sender As Object, ByVal e As AxMapPoint._IMappointCtrlEvents_SelectionChangeEve nt) Handles AxMappointControl1.SelectionChange
Dim oPushPin As MapPoint.Pushpin
Dim Loc, Loc2 As MapPoint.Location
Dim lat, lon, Altitude As Double
Dim Type As MapPoint.GeoDataMapType

Loc = oMap.Selection
CalcPos(oMap, Loc, lat, lon)
Loc2 = oMap.GetLocation(lat, lon, Altitude)
oPushPin = oMap.AddPushpin(Loc2, "Point route")
oPushPin.Symbol = 82

End Sub


Something mysterious....

 
Web mp2kmag.com
mapforums.com