LD147
asked on
MapPoint in VB.Net - add pushpin to map
I really hate MapPoint! :) I have an address in a variable named 'address' which looks like this (Street, City, State, Zip). I'm trying to add a Push Pin to the map, with this address, but to no avail. I always have problems programming MapPoint.
Here's the code I have. I get no errors. However, no push pins appear on the map. TIA.
Here's the code I have. I get no errors. However, no push pins appear on the map. TIA.
AxMappointControl1.NewMap(MapPoint.GeoMapRegion.geoMapNorthAmerica) ' start new map
' ***
' address (variable) is defined here...figured you didn't need to see the code for that, and placed into a variable named 'address'
' ***
' plot this address onto the map
Dim oPushPin As MapPoint.Pushpin
Dim oMap As MapPoint.Map
oMap = GetObject(, "MapPoint.Application").ActiveMap
oPushPin = oMap.AddPushpin(oMap.FindResults(address)(1), "some text here") ' set pushpin to the current customer street address
oPushPin.Location.GoTo() ' zoom in on last pushpin drawn
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I uninstalled MapPoint and reinstalled - the pushpins now appear on the map. LOL.
ASKER
Even though your code didn't really fix my problem, I appreciate the help :) It turns out, I guess, that a setting, or something got corrupted somewhere. The reinstall fixed it :)
ASKER