Hi,
I am trying to use MapPoint Control not with Visual Basic but with another language ( Windev ).
Everything works but I can't find the equivalent of array of objects
like in AddPolyLine( array ( ObjLocParis, ObjLocOrleans, ObjLocNice))
My Code to Add PolyLine is:
*******************************************
Function AddPolyLineToMap()
objMap est un objet Automation dynamique
objLoc est un tableau de 3 objet Automation dynamique
// ie ObjLoc is an array of 3 Automation dynamic Objects
cStreet1, cCity1 ,cOtherCity1 ,cRegion1 , cPostalCode1 sont des chaînes
cStreet2, cCity2 ,cOtherCity2 ,cRegion2 , cPostalCode2 sont des chaînes
cStreet3, cCity3 ,cOtherCity3 ,cRegion3 , cPostalCode3 sont des chaînes
objMap = MapPointControl1>>ActiveMap
cStreet = "1 Rue Didot"
cCity = "Paris"
cOtherCity = ""
cRegion = ""
cPostalCode = "75014"
objLoc[1] = objMap>>FindAddressResults...(cStreet1,cCity1,cOth erCity1 , cRegion1 , cPostalCode1)>>Item(1)
cStreet2 = "1 rue du Laos"
cCity2 = "Paris"
cOtherCity2 = ""
cRegion2 = ""
cPostalCode2 = "75015"
objLoc[2] = objMap>>FindAddressResults...(cStreet2,cCity2,cOth erCity2 , cRegion2 , cPostalCode2)>>Item(1)
cStreet3 = "13 Rue des Plantes"
cCity3 = "Paris"
cOtherCity3 = ""
cRegion3 = ""
cPostalCode3 = "75014"
objLoc[3] = objMap>>FindAddressResults(cStreet3,cCity3,cOtherC ity3 , cRegion3 , cPostalCode3)>>Item(1)
objMap>>Location = ObjLoc[1]
objMap>>Shapes>>AddPolyline(ObjLoc)
// ( the bug is here , in the last line )
RETURN 0
//************************************
I have an error message at the line
objMap>>Shapes>>AddPolyline(ObjLoc)
saying that it's not possible to convert the 1st parameter (ObjLoc) in automation parameter
"Le paramètre 1 n'est pas convertible en paramètre automation".
Thanks for your help
Delphine