Select to view content in your preferred language

Building a Zoom In and Zoom Out Tool as an Add-In?

992
8
03-07-2013 06:56 AM
IanPeebles
Frequent Contributor
Has anyone been able to put together a zoom in and zoom out tool for the silverlight viewer?  For example, a user can click on a icon, then draw a box on the map to set the zoom in/out extent.

Just wondering if anyone has put these toolsets together.  I know we can use the mouse click and shift + left mouse click to zoom in, but many users do not like that functionality and it is hard to use on laptops.

I am very interested if somebody has done this.  ESRI, are there any suggestions you might have?
0 Kudos
8 Replies
JohanCarlsson
Regular Contributor
I have done this using tools with custom cursor. The user draws a rectangle and the application then zooms to the extent. I can supply you with the code if you'd like.
0 Kudos
IanPeebles
Frequent Contributor
[RIGHT][/RIGHT]
I have done this using tools with custom cursor. The user draws a rectangle and the application then zooms to the extent. I can supply you with the code if you'd like.


Hochas,

Please do.  I reallly appreciate that :). Curious to see how you got this to work.
0 Kudos
JamalNUMAN
Legendary Contributor
[RIGHT][/RIGHT]

Hochas,

Please do.  I reallly appreciate that :). Curious to see how you got this to work.



Hi Ian,

This tool is really interesting. I think all users would like to have it.

Also Ian, I couldn�??t manage to let the great code (that you have sent) work. it still shows the same error. I�??m not sure what to do to let it work. it should be something wrong in my case considering that fact that it is working fine with your Silverlight as obviously displayed in the screenshot you have already supplied. It is only you who has helped in this thread

http://forums.arcgis.com/threads/78352-Displaying-more-than-one-

What other issues should I consider to let it work?

Best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
IanPeebles
Frequent Contributor
I have done this using tools with custom cursor. The user draws a rectangle and the application then zooms to the extent. I can supply you with the code if you'd like.


Johan,

I am very interested in this code you provided or any guidance you might have.  Did you develop this tool as a add-in?


Jamal,

If your tool works in desktop, then it should work in the server environment.  At this time, I do not have any other suggestions that I can think of at this time.  Try running the tool in desktop again, and re-publish as a service.  You are running ArcGIS Server 10.1 and ArcGIS Desktop 10.1 correct?
0 Kudos
JohanCarlsson
Regular Contributor
Hi Ian!

No, unfortunately I haven't developed this as a standalone add-in. I'm developing a larger project where many add-ins are delivered in a single file and I dont have the time to extract it. I'll send you the code though, all you'll have to do is make an add-in out of it. Hopefully someone can help you if you can't do it.

Best of luck!
0 Kudos
JamalNUMAN
Legendary Contributor
Johan,

I am very interested in this code you provided or any guidance you might have.  Did you develop this tool as a add-in?


Jamal,

If your tool works in desktop, then it should work in the server environment.  At this time, I do not have any other suggestions that I can think of at this time.  Try running the tool in desktop again, and re-publish as a service.  You are running ArcGIS Server 10.1 and ArcGIS Desktop 10.1 correct?


Thank you Ian for the time and effort,

This is what confused me the most!

1. I have ArcGIS 10.1 (desktop and server)

2. The python is working fine in the ArcGIS desktop

Nevertheless, it fails to work on the silverligth (I repeated it multiple times but never work)

I�??m attaching (in the link below) the screenshots for ALL the steps that I did to publish the service and to build a web application. Please, if your time permits, have a look and let me know what I might be missing in my steps?

http://www.mediafire.com/view/?k2dqyzi3y18g412


All the best

Jamal
----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
IanPeebles
Frequent Contributor
Hi Ian!

No, unfortunately I haven't developed this as a standalone add-in. I'm developing a larger project where many add-ins are delivered in a single file and I dont have the time to extract it. I'll send you the code though, all you'll have to do is make an add-in out of it. Hopefully someone can help you if you can't do it.

Best of luck!


Hochas. . that will be great.  If you can attach a .zip file.  I will have a look at what you have done and can probably get an idea on how to convert it to a add-in tool.  I am starting to work on add-ins.  Again, I really appreciate your offer of supplying your code.  Thanks.
0 Kudos
tarmiziabd_rahim
Deactivated User
hi plss refer this..i already developed it.---->http://www.arcgis.com/home/item.html?id=11be1a3a9bdf4fb2aeed81fd13908a8b
0 Kudos