Our logistics planning system (VFP8) includes MapPoint for display of data (location of plants, depots, etc.). We have been successful importing data, displaying data and working with maps. The user clicks a button and our VFP code takes over.
But we are stuck in that we are not able to display pushpin data in the individual ballons (such as volume and capacity for a location). I am attaching that part of the code we have that is supposed to do the job, but it simply is not working.
I suspect that the problem is related to the use of the method "setfieldsvisibleinballon"
Any suggestions would be extremely useful!
Thanks
Jerry Bendiner
TechnoLogix
Toronto, Canada
HERE IS THE CODE FOR THE SECTION OF THE PROGRAM
*
#DEFINE geoImportExcelSheet 0
#DEFINE geoCountryMultiCountry 39070
#DEFINE geoDataMapTypePushpin 4
#DEFINE geoMapFontSmallest 4
myApp = CREATEOBJECT("MapPoint.Application")
myMap = myApp.NewMap()
myMap.MapFont = geoMapFontSmallest
myApp.UserControl = .T.
myApp.WindowState = 0 && Maximized.
myMap.MapStyle = 2 && Data
myApp.PaneState = 3 && Don't show the legend pane.
myApp.Toolbars.Item("Location and Scale").Visible = .f.
myApp.Toolbars.Item("Drawing").Visible = .f.
dimension showfield[4]
currdir=alltrim(sys(2003))
*
* import plant data
*
myfile = "d:\mapdata\plants.xls!plants!"
DSplant = myApp.ActiveMap.DataSets.ImportData(myfile, , geoCountryMultiCountry, , geoImportExcelSheet)
DSplant.name="Plants"
DSplant.Symbol= 57
showfield[1]="city"
showfield[2]="state"
showfield[3]="country"
showfield[4]="volumen"
DSplant.setfieldsvisibleinballon showfield
DSplant.fieldnamesvisibleinballoon=.t.
myApp.visible=.t.
DSplant.DisplayPushpinMap
But we are stuck in that we are not able to display pushpin data in the individual ballons (such as volume and capacity for a location). I am attaching that part of the code we have that is supposed to do the job, but it simply is not working.
I suspect that the problem is related to the use of the method "setfieldsvisibleinballon"
Any suggestions would be extremely useful!
Thanks
Jerry Bendiner
TechnoLogix
Toronto, Canada
HERE IS THE CODE FOR THE SECTION OF THE PROGRAM
*
#DEFINE geoImportExcelSheet 0
#DEFINE geoCountryMultiCountry 39070
#DEFINE geoDataMapTypePushpin 4
#DEFINE geoMapFontSmallest 4
myApp = CREATEOBJECT("MapPoint.Application")
myMap = myApp.NewMap()
myMap.MapFont = geoMapFontSmallest
myApp.UserControl = .T.
myApp.WindowState = 0 && Maximized.
myMap.MapStyle = 2 && Data
myApp.PaneState = 3 && Don't show the legend pane.
myApp.Toolbars.Item("Location and Scale").Visible = .f.
myApp.Toolbars.Item("Drawing").Visible = .f.
dimension showfield[4]
currdir=alltrim(sys(2003))
*
* import plant data
*
myfile = "d:\mapdata\plants.xls!plants!"
DSplant = myApp.ActiveMap.DataSets.ImportData(myfile, , geoCountryMultiCountry, , geoImportExcelSheet)
DSplant.name="Plants"
DSplant.Symbol= 57
showfield[1]="city"
showfield[2]="state"
showfield[3]="country"
showfield[4]="volumen"
DSplant.setfieldsvisibleinballon showfield
DSplant.fieldnamesvisibleinballoon=.t.
myApp.visible=.t.
DSplant.DisplayPushpinMap