get_Shapefile method not exposed

Good Morning,

Myself and another developer are working with the MapWinGIS OCX control (version 5.3) with some degree of success. We are programmers using VFP (Visual FoxPro). We’ve coded to create a Shapefile layer, and store the layer handle to a form property, but when the layer already exists we need to identify the object within the map control that corresponds to the LayerHandle which is a property that stores the return value from AxMap1.AddLayer(). The MapWinGIS documentation suggests that this is easily done by calling the ‘get_Shapefile’ method to get an object reference to the current Shapefile layer.

*** Sample MapWinGIS Code *** sf = axMap1.get_Shapefile(m_layerHandle);

We try calling the ‘get_Shapefile’ method even though it is not shown in the VFP properties sheet for the ocx but it does not appear to be exposed. The VFP Code below fails with an OLE Error ‘Unknown Name’

loSF = THISFORM.axmap1.get_Shapefile(THISFORM.LayerHandle)

It seems more things are exposed in the ocx embedded object so we also tried calling it this way

loSF = THISFORM.axmap1.object.get_Shapefile(THISFORM.LayerHandle)

The ultimate goal is to display image icons on the map using VFP. Would anyone know the reason why the “get_Shapefile” method is not exposed, and if so, how to expose it?

Any help would be greatly appreciated!

Thank you!


This issue was resolved. VFP does not use the get_ construct of the method.

Use Shapefile(layerhandle) or GetObject(layerhandle)