Hello everyone.
In my application I have declared
Private MapPointApp As MapPoint.Application
Private objFindResults As MapPoint.FindResults
Also I have an instance of the MapPointControl called objMapPointControl.
In the Form.Load event:
Set MapPointApp = New MapPoint.Application
objMappointControl.NewMap (geoMapEurope)
The map shows as planned in the control. Then I perform an address search and stores the result in a global:
Set objFindResults = MapPointApp.ActiveMap.FindResults(strAddress)
Later I want to add a pushpin to the map and I use:
Dim i As Integer
Dim objLocation As MapPoint.Location
Dim objPushpin As MapPoint.Pushpin
Dim objMap As MappointCtl.Map
Set objMap = objMappointControl.ActiveMap
i = 1
Set objLocation = objFindResults(i)
Set objPushpin = objMap.AddPushpin(objLocation)
And on this row, the error "Method AddPushPin of object '_Map' failed" occurs.
Can anyone see what the problem might be?
- Niklas
I am using MP2004 and VB6.