Select to view content in your preferred language

Sample Viewer Modifications

2184
18
09-02-2010 01:24 PM
ChadHall
Emerging Contributor
I'm brand spanking new to Flex and am fumbling my way through it.  I was able to make the modifications the mini help file (comes with the download fo the sample viewer) suggested to get accustomed to the programming but that was pretty simple stuff in my mind.

I've even been able to (today at least) show my own data within the sample viewer by placing the correct REST URL in the operational layers section of the config.xml file.  Here's where it goes haywire for me.  It's not pulling in all the layers I have in the service.  And I've updated the service to my knowledge (even created a different one) but that one's not even showing up in the Rest services directory.

So I'm stuck and I don't know how to proceed and I'm hoping this is a simple fix.  I know we've had issues with seeing services based on how our server is setup and behind a firewall (we have to use reverse proxy rules to deploy any applications).

Other issues:
1) I'm also seeing a slight issue with my sample viewer in that the measurment tool under the draw widget isn't working.  Anyone aware of this or did I mess up some code?

2) Identify: I would love to have a simple identify tool/widget that works like the example in the sample resource center but I'm so new I don't know if I'm supposed to create a new file, what kind of file, etc?  I have FlexBuilder 4 installed on my server but it's not pulling in files (other than .xml) in any readable fashion.

3) Hyperlink: Eventually I have a field setup from the ArcIMS days that I want users to be able to jump from the identify information results to the URL stated in the table.  Any suggestions on where to find this example?

Alright, sorry for the long post but I've been trying to do this all myself and I'm just not understanding the new Flex format/language.  And I don't have a neat little book like I did with ArcIMS (or I haven't found it yet) so I'm having trouble finding example and simple start up information.  Thanks in advance for any help provided and I'll be more than willing to share any code or files if needed to come to a solution.

Thanks
Chad
Tags (2)
0 Kudos
18 Replies
JosephGibson
Deactivated User
So there's not going to be an identify widget for the non-beta version? If this is true I have to say I am highly disappointed and a little dismayed. As this has been one of the most asked about (and highly needed) functions not available in the current beta viewer.
0 Kudos
ReneRubalcava
Esri Frequent Contributor
I added an Identify Widget to the Code Gallery
http://www.arcgis.com/home/item.html?id=952242d872654661984c7d7e183d2183

The actual Identify tool is just a component added to the widget, so there are no Flexviewer dependencies, so it should port over fairly easily when Flexviewer 2 gets updated.
It may not work exactly how most people would use it, but it works great for our particular workflow here in the office.
0 Kudos
JosephGibson
Deactivated User
Thanks for posting this Rene! Just implemented it into my flex viewer and it works great! All I needed to do was make some minor alterations.  I have one quick question though. Instead of listing all the layers that are available in the drop down list is it possible to only show layers that are currently activated? I am not a programmer and have no idea if this is a simple task or not. But any info you could provide to point me in the right direction would be a great help.
0 Kudos
ReneRubalcava
Esri Frequent Contributor
As in only what's visible? At that scale level as well?
If I don't have time this week, I can implement that this weekend.

Thanks for feedback.
0 Kudos
JoshCalhoun
Emerging Contributor
Bjorn,

What about the hyperlink widget? Are we going to see one also in the new sample map viewer?

I was just curious.
0 Kudos
ChadHall
Emerging Contributor
Rene,

Sorry, this might be a dumb question, but am I supposed to generate a swf file from the mxml file in builder?  Again, I'm very fresh to Flex but when I played with the widget at the link provided it seemed to do exactly what I needed.  I downloaded the files, placed the folder with the other widget folders and added the code to the config.xml file.  I see the widget in my top bar but clicking on it produces no widget container.

Thanks
0 Kudos
ReneRubalcava
Esri Frequent Contributor
I updated the download page with info on how to compile in to your own project.
You can also look here and it briefly tells you how to add your own widgets to a project.
http://help.arcgis.com/en/webapps/flexviewer/help/developers/widget_framework.htm

Thanks.
0 Kudos
ChadHall
Emerging Contributor
Rene,

I'll have to play with it over the next couple weeks because it's not fitting in for me.  I have the src code, created the flex project, added the widget, built the project after making mods to the code and it's throwing errors when I try to export the build.  In my typical, not-being-a-programmer personality, I'm gonna walk away from it and clear my head and see if it helps.

I don't understand why ESRI wouldn't include an identify widget with the sample viewer.  it's such a base task that I would have thought it be mandatory but I guess not.

Thanks for the help Rene, I'm sure I'll be talking to you more later.

Chad
0 Kudos
JosephGibson
Deactivated User
Hey Rene,

Thanks for getting back to me. In answer to your question, yes as in only the layers that are visable.  For example, say I have a schools layer, a hospitals layer, and fire stations layer all turned on and visable on the map, respectively,those would be the only layers I would want to see in the drop down list.  The scale level wouldn't be an issue.

Thanks again!

Joe
0 Kudos