Description:

This sample illustrates how to create a GeoPolygon object and display it as a graphic in ArcMap using a GeoPolygonElement. A GeoPolygon is a spheroid-aware polygon, the line segments of which are composed of GeoPolylines. A GeoPolygonElement is a spheroid-aware IElement object that dynamically updates its shape when the underlying geometry changes or is moved from one geographic location to another.
Products: ArcView Minimum ArcGIS Release: 9.3

How to use:
  1. Make sure to add a reference to the ESRI DefenseSolutions Object Library.
  2. Paste the code into VBA.
  3. Run the function from the Macros dialog.
  4. Select the GeoPolygonElement graphic and drag it to another location in the map and note how it changes.
New Point

pPoint.PutCoords 0, 63
pColl.AddPoint pPoint
pPoint.PutCoords 7, 51
pColl.AddPoint pPoint
pPoint.PutCoords 14, 63
pColl.AddPoint pPoint
pPoint.PutCoords 24, 56
pColl.AddPoint pPoint
pPoint.PutCoords 33, 74
pColl.AddPoint pPoint
pPoint.PutCoords 17, 68
pColl.AddPoint pPoint

Set pPoly = pColl
pPoly.Close

New GeoPolygon
pGeoPoly.Polygon = pPoly

'geodesy geometry type for the line segments comprising the GeoPolygon.
pGeoPoly.SpecialGeolineType = cjmtkSGTGeodesic

New GeoPolygonElement
pElement.Geometry = pGeoPoly

Set pGraph = pView.GraphicsContainer
pGraph.AddElement pElement, 0

pView.Refresh

End Sub


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-07
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2021-04-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-20
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
相关资源
相似解决方案