Community of VE/MapPoint Users and Developers
This is a discussion on mappoint lat/lon within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I log some coördinates from GPS.. $GPGGA,062417,5111.8695,N,00425.7264,E,1,03,3.4,4. 8,M,47.1,M,,*4C I extract the lat = 00425.7264 and lon = 5111.8695 I put ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| mappoint lat/lon $GPGGA,062417,5111.8695,N,00425.7264,E,1,03,3.4,4. 8,M,47.1,M,,*4C I extract the lat = 00425.7264 and lon = 5111.8695 I put in code : Set wwLoc = mainMap.GetLocation(lat,lon) And what do I get: Run-time error '-2147.......(8007....) : The parameter is incorrect.. What is it that I do wrong? |
| |||
| mappoint lat/lon
I don't know about your code, but I think you will need to convert to decimal format for MapPoint, that's what I use. i.e. 5111.8695 N = 51.19783 N = latitude You are in Antwerp, yes? BTW u hav your lat and long reversed. |
| |||
| Re: mappoint lat/lon Quote:
Indeed, I am in Antwerp.. So I have to convert to the decimal format... any idea how to do that in VB 6? cause I am very new to VB... Many Tnx |
| |||
| mappoint lat/long
Here's a function I wrote to do just that, you pass the value in GPS NMEA format and the function returns the decimal format. Use like this assuming you have the NMEA value for lat in a string:- lngDecimalLatitude = gpsConvert(strNMEAlatitude) Use again for Long Copy and paste into VB6 and it should look better when the colours are correct. Private Function gpsConvert(ByVal sngTemp As Single) As Single ' converts GPS format to Infomap format Dim intDegrees As Integer intDegrees = Int(sngTemp / 100) gpsConvert = intDegrees + (sngTemp - (intDegrees * 100)) / 60 ' sngTemp - (intdegrees * 100) removes the whole degrees, 'then devide by 60 to get decimals of a degree, then add the whole degrees back on to get degrees and decimals of a degree End Function Chris |
![]() |
| Tags |
| lat or lon, mappoint |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |