-->
اكتب ما تود البحت عنه و اضغط Enter
معذرة، فالصفحة التي تبحث عنها في هذه المدونة ليست متوفرة.

الأربعاء، 13 أبريل 2016

Adding the find closest tower tool

Adding the find closest tower tool
The tool add-in allows interactions with the map. We have just shown a tool in the
previous section where we added a point using the Draw toolbar. When you select
a tool, you can click on the map and get the location. You can use this location to do
so many things with it. In this section, we will add our own tool that displays the
current location, and then we will add more functionality to it. Follow these steps to
add the tool:
1. Open our TelZaViBa project; you can pick up from where we left off
back in Chapter 2, App 1 – the Cell Tower Analysis Tool. If you are not
sure, you can get the latest source code from this supporting files code
under B04847_03_Files\telzaviba\StartCode and copy it to
C:\ArcGISByExample\telzaviba\Code. Just make sure to delete
any code in the folder before copying.
2. From the Visual Studio window, point to the Project menu and click
on Add Class.
3. From the dialog, expand Common Items | ArcGIS and then click on
Desktop Add-ins. Select Add-in Component and type tlFindClosestTower
in the Name field. Click on Add to add the class to your project.
4. From the add-in wizard, select Tool from the Add-in Component panel.
5. Type Find the Closest Tower to the Point in Caption, Tooltip,
and Description. Then type TelZaViBa in Category. Select the
cell phone picture for the tool image; you can find the images under
B04847_03_Files\telzaviba\Icons.
7. Now we need to add this tool to the cell tower analysis tool toolbar. To do
that, double-click on the Config.esriaddinx, find the <Toolbars> XML tag,
and add the following highlighted code:
 <Toolbars>
 <Toolbar id="TelZaViBA_Cell_Tower_Analysis" caption="Cell
Tower Analysis Tool" showInitially="false">
 <Items>
 <Item refID="TelZaViBA_btnShowTowerRange" />
 <Item refID="TelZaViBA_tlFindClosestTower" />
 </Items>
 </Toolbar>
 </Toolbars>
8. Open tlFindClosestTower by double-clicking it.
9. You should see a couple of empty methods called New and OnUpdate. What
we are interested in is onMouseUp, that is the event which is fired when you
click on the map and release your mouse button. The onMouseUp event is not
there, so we have to add it manually. Write the following code to override
the onMouseUp sub:
Protected Overrides Sub OnMouseUp(arg As ESRI.ArcGIS.Desktop.
AddIns.Tool.MouseEventArgs)
 End Sub

شارك الموضوع عبر :

كاتب الموضوع :

ليست هناك تعليقات:

إرسال تعليق

بث مباشر

انتظروا البث المباشر للإجابة على تساؤلاتكم

730

بتوقيت مصر

830

بتوقيت مكة المكرمة

مدونة بحث علمي
مدونة بحث عملي تهتم بطرح العديد من البحاث العلمية و المواضيع المهمة و المفيدة التي يحتاجها كل مدون و او مصمم و كل شخص باحث عما يفيده في احتياجاته لتطوير انفسة او البرامج التي يبحث عنها اصحاب مجالات المختصة في جميع التخصصات المختلة هدف الموقع تقديم الخدمات و المساعدات في التطوير و التصميم و كل شئ تقريبا و حظا موفق مدونة بحث عملي
للإتصال بما :Ahmedragab9497@gmail.com
جميع الحقوق محفوظة ل famous egypt

تصميم و تكويد   احمد رجب