Select to view content in your preferred language

Something I'm still a little confused about...

3808
33
02-22-2011 11:17 AM
JustinRiggs
New Contributor
Hi everyone,

Well, with the help of the samples and this forum, my humble little application is coming along fairly well. The boss is happy, which makes me happy, and I'm actually pretty pleased with what I've been able to develop so far... I do have one little problem, however, and I just can't get clear on whether or not what I want to do is possible.

My problem is that I showed my boss the sample Viewer before I began developing my own application. Obviously, what the guys at ESRI did is really impressive, so he got the idea that I could develop something that would give him the same look and feel. I've talked him down from that ideal by pointing out that our users wouldn't know what to do with such a nice interface, but there is one thing he won't budge on: he wants something that is just like the Navigation widget from the Sample Viewer.

Now, in my limited knowledge, it seems like I should somehow be able to "transplant" the code from the Sample Viewers source to my project. Is that just crazy talk? Is it just too involved for a beginner like me to do?

I could really use someone's help on this. If I can't produce this, I've got to know exactly why so that I can explain it to The Man.

Thanks for all your help (everyone), and happy coding!

Justin
Tags (2)
0 Kudos
33 Replies
MouMezou
New Contributor
Hi Robert,

since you seem to have a VERY good understanding of how the navigation widget works, and i have been using it without a problem as explained above. but i'm having a hard time to change the label of the buttons for the navigation bar.  the reason i'm trying to change the labels is to be able to accomodate the english/french for "Pan, Zoom In, Zoom Out, Full Extent"
i tried to make the changes inside the NavigationWidget.mxml (NavToolItem(configXML.zoomoutbutton.@label||"ZZoom Out") just to test if that will change the Zoom out label by adding an extra Z but it didn't, so i'm confused to where I should look to accomodate both languages when a user switch back/forth.

I'm currently using the Flex API 2.3.1 2011-04-26 and I'm using a resoucebundle to handle the language switching.

Lastly I noticed that when my application is loaded the pan icon is  not showing , but when I roll the mouse over it becomes visible and I'm not sure why it is doing that. is it something i edit in the NavigationWidget.mxml that its causing that? I will really appreciate any direction form you or anyone  on this issue.

I have attached an image.

Thanks
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Moussadak,

   Based on your attached image the label change you made would not show up because you do not have to Zoom Out tool visible. Changes to the label like you did will work fine when they can apply to something that is visible. As far as the pan icon image being broke, that is something you must have changed in your code to do that or you just don;t have the assets where they are suppose to be.
NavigationWidget.mxml
navtool.panItem = new NavToolItem(configXML.panbutton.@label || "Pan", configXML.panbutton.@icon, configXML.panbutton.@visible == 'true');


NavigationWidget.xml
<panbutton visible="true" icon="com/esri/Navigation/assets/images/i_pan.png" />
0 Kudos
KenBuja
MVP Esteemed Contributor
This tool has been working well, but when I upgraded to FG 4.6, I'm getting the broken link to the Pan/Zoom In/Zoom Out images also. This is with both pre-sparked version for the 2.3.1 API as well as the version for 2.4. The images appear when I mouse over them.
[ATTACH=CONFIG]11760[/ATTACH]
0 Kudos
KevinKimm
New Contributor II
To fix the broken image problem on Pan, Zoom In, and Zoom Out buttons, change "Imageicon" property just to "icon" under navigation.mxml.
0 Kudos
KenBuja
MVP Esteemed Contributor
Thanks Ben, that fixed it!
0 Kudos
sofialoulad
New Contributor
hii all;
i'm trying to work with Go electric to re-skin my flex viewer project
so i need to migrate from arcgis api 2.2. To 3.0
finaly i get one error is
The skin part type 'mx.controls:VSlider' must be assignable to 'spark.components.supportClasses:SliderBase'.
Can someone help me to fix T
tnx a lot
0 Kudos
NadirHussain
Occasional Contributor II
Dear Robert,

I use your navigation widget in my code.The big problem is that it not directly come on the map.it always be down on the control of the map.Or UP right or left according to position of source control.i want it should directly come on map like in flex Viewer................................Sp please help how can this issue be solved.

Thaks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nadir,

   I am not real sure that I understand your question. Are you placing the navigation component inside the map mxml component? If so than that is your issue. Place the navigation component as the last component in your application, after the map and before the closing Application tag.

    </esri:Map>
    <navigation:NavigationWidget map="{map}" left="12" top="12" /> 
</s:Application>
0 Kudos
NadirHussain
Occasional Contributor II
Dear Sir,

I solved the placement issue.the only problem which I am facing about skin and icon images of navigation control are not visible on the control.please guide me what can be the reason.


Thanks.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nadir,

   Are you using the compiled swc or the source code?
0 Kudos