<?xml version="1.0" encoding="UTF-8"?><?mso-infoPathSolution PIVersion="1.0.0.0" href="http://devinfo/sites/sdk/netengdt/NetEngDtSample/Forms/template.xsn" language="en-us" name="urn:schemas-microsoft-com:office:infopath:NETEngDtSample:" solutionVersion="9.4.0.673" productVersion="12.0.0" ?><?mso-application progid="InfoPath.Document"?><esri_sdk_sample xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-02-10T23:25:53" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003">
  <title>Geoevents in a MapControl</title>
  <purpose>This sample demonstrates adding elements to a map's GraphicsContainer, then moving the elements in response to a timer. It also demonstrates setting a coordinate system and projecting data. </purpose>
  <development_license>
    <license>
      <name>Engine Developer Kit</name>
      <extension>
      </extension>
    </license>
  </development_license>
  <deployment_license>
    <license>
      <name>Engine</name>
      <extension>
      </extension>
    </license>
    <license>
      <name>ArcGIS Desktop Basic</name>
      <extension>
      </extension>
    </license>
    <license>
      <name>ArcGIS Desktop Standard</name>
      <extension>
      </extension>
    </license>
    <license>
      <name>ArcGIS Desktop Advanced</name>
      <extension>
      </extension>
    </license>
  </deployment_license>
  <min_version>10.0</min_version>
  <min_sp/>
  <max_version>
  </max_version>
  <max_sp/>
  <data_paths>
    <data_path/>
  </data_paths>
  <requirements>
    <requires>
    </requires>
  </requirements>
  <file_section>
    <files lang="CSharp">
      <file>
        <filename>AssemblyInfo.cs</filename>
        <description>Assembly information. </description>
        <viewable_code>false</viewable_code>
      </file>
      <file>
        <filename>GeoEvents.cs</filename>
        <description>Form file. </description>
        <viewable_code>true</viewable_code>
      </file>
    </files>
    <files lang="VBNet">
      <file>
        <filename>AssemblyInfo.vb</filename>
        <description>Assembly information. </description>
        <viewable_code>false</viewable_code>
      </file>
      <file>
        <filename>GeoEvents.vb</filename>
        <description>Form file. </description>
        <viewable_code>true</viewable_code>
      </file>
    </files>
  </file_section>
  <how_to_use_section>
    <how_to_use>
      <how_to_use_steps>
        <step>Toggle between enabling and disabling GPS tracking.</step>
        <step>Use the left mouse button to zoom in and the other mouse buttons to buffer a point and create a polygon. If any of the agents are within the polygon, their symbology is changed. </step>
      </how_to_use_steps>
    </how_to_use>
  </how_to_use_section>
  <additional_information>The application uses the AddShapeFile and AddLayerFromFile methods to load sample world data, which is then symbolized. The SpatialReference property of the MapControl is set to a projected coordinate system (esriSRProjCS_World_Mollweide). Points are created from an array containing latitude and longitude values and are given a SpatialReference property set to a geographic coordinate system (esriSRGeoCS_WGS1984). Each point is then projected onto the projected coordinate system of the MapControl and added to its GraphicsContainer. <br xmlns="http://www.w3.org/1999/xhtml" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-02-10T23:25:53"/><br xmlns="http://www.w3.org/1999/xhtml" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-02-10T23:25:53"/>When global positioning system (GPS) tracking is enabled by the user, a timer is used to randomly assign new x,y coordinates to each point within the GraphicsContainer after a specified time interval. Each point is projected onto the geographic coordinate system to ensure that it resides within the horizon of the esriSRGeoCS_WGS1984 coordinate system. Each point is then projected back onto the projected coordinate system (esriSRProjCS_World_Mollweide) of the MapControl before the graphics are refreshed to reflect the change in their geometry. <br xmlns="http://www.w3.org/1999/xhtml" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-02-10T23:25:53"/><br xmlns="http://www.w3.org/1999/xhtml" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-02-10T23:25:53"/>The OnMouseDown event uses either the TrackRectangle method to zoom in (if the left mouse button is used) or creates a point based on the location of the mouse (if the middle or right mouse button is used). A polygon is created by buffering the point using the ITopologicalOperator interface and drawn on the MapControl using the DrawShape method. Each element within the GraphicsContainer is tested using the IRelationalOperator interface to determine whether it is contained by the polygon. If a point is contained by the polygon, its symbol is then changed. </additional_information>
  <related_topics>
    <topic>
      <topic_display>MapControl class</topic_display>
      <topic_link>esriControls/MapControl.htm</topic_link>
    </topic>
    <topic>
      <topic_display>IMapControl2 interface</topic_display>
      <topic_link>esriControls/IMapControl2.htm</topic_link>
    </topic>
  </related_topics>
  <content_area_tags>
    <tag>Controls</tag>
    <tag>Cartography, Mapping, &amp; 2D Display</tag>
  </content_area_tags>
  <guid>95C5FE4E-3AF8-49f9-909B-07062DACAFDA</guid>
  <content_management>
    <owner>Mary Harvey</owner>
    <tech_reviewer>Gayle Young</tech_reviewer>
    <status>SDK inclusion completed</status>
    <requested_tocs>
      <desktop>false</desktop>
      <engine>true</engine>
      <server>false</server>
      <net_ide_integration>false</net_ide_integration>
      <xo>false</xo>
    </requested_tocs>
    <applied_tocs>
      <desktop>false</desktop>
      <engine>true</engine>
      <server>false</server>
      <net_ide_integration>false</net_ide_integration>
      <xo>false</xo>
    </applied_tocs>
    <last_updated_date>2010-03-01</last_updated_date>
    <last_updated_time>17:02:23</last_updated_time>
    <copyediting>
									<last_copyedit_date>2010-03-01</last_copyedit_date>
									<last_copyedit_time>17:02:17</last_copyedit_time>
									<copyeditor>linn</copyeditor>
								</copyediting><edits>
      <editing_section>
        <editor_name>kyli4140</editor_name>
        <edit_date>2008-11-17</edit_date>
        <edit_time>15:38:41</edit_time>
        <edit_notes>Form brought into StarTeam. For previous notes and history see the SharePoint site at <a href="" xmlns="http://www.w3.org/1999/xhtml">http://devinfo/sites/ArcGISNetSDK/default.aspx</a> as well as the files in the ArcObjects VSS in Samples NET.</edit_notes>
      </editing_section>
    <editing_section>
									<editor_name>linn</editor_name>
									<edit_date>2010-03-01</edit_date>
									<edit_time>17:01:49</edit_time>
									<edit_notes><ul xmlns="http://www.w3.org/1999/xhtml" style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px" type="disc">
<li>Edited.</li>
<li>Already in the SDK.</li></ul></edit_notes>
								</editing_section></edits>
  </content_management>
  <current_user>linn</current_user>
  <sdk>NETEngDt</sdk>
  <doc_type>Sample</doc_type>
</esri_sdk_sample>