POST
|
Hi! When I've made some updates to my custom Flex Viewer 2.1 application and publish the new version on our server, my colleagues don't see those changes because the old version is stored in their browsers cache. Deleting all ache files will fix this, but I don't want them to have to do that all the time. I've searched for some info on how to prevent client-side caching, and it seems like the most common solutions is to either and some random number or time-stamp to the url when calling the swf-fil (something like index.swf?time='time-stamp', or to "set the HTTP headers for the SWF file request in the HTML wrapper" Here's some example code to do this in JSP: // Set Cache-Control to no-cache.
response.setHeader("Cache-Control", "no-cache");
// Prevent proxy caching.
response.setHeader("Pragma", "no-cache");
// Set expiration date to a date in the past.
response.setDateHeader("Expires", 946080000000L); //Approx Jan 1, 2000
// Force always modified.
response.header("Last-Modified", new Date()); (From the Adobe help documentation) I've also seen similar examples in PHP. My problem is I don't know how to use this code with my Flex Viewer application, I hardly know what JSP is. I guess I should do something with the index.html or the index.template.html (to keep the changes when rebuilding my project) Or maybe someone has another solution to my problem?
... View more
11-05-2010
04:32 AM
|
0
|
9
|
4652
|
POST
|
Thank you so much Robert! That's great! I could even implement the code in the MapSwitcherWidget, so it works exactly as I want.
... View more
11-01-2010
02:15 AM
|
0
|
0
|
537
|
POST
|
Hi! I would like to group my services in the TOC in several groups in an Accordion, like this TOC http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=15874 from the old code gallery (the groups version of it). Has anyone done this or something similar in the FlexViewer 2.1? I'm also thankful if someone could point me in the right direction and give me some tips on where to begin.
... View more
10-29-2010
12:23 AM
|
0
|
10
|
1014
|
POST
|
I would like this in my Flex Viewer 2.1 too, I actually tried rewriting Roberts implemetation for the SFV 1.3 to the Flex Viewer 2.1. I managed to get rid of all errors, but when I ran the application there wasn't a map at all, all was blank, that's were I gave up. It will need a lot more modifications than changing extent.containsExtent to extent.contains, to apply this to the FlexViewer 2.1 that's for sure 🙂
... View more
10-28-2010
05:22 AM
|
0
|
0
|
344
|
POST
|
Robert, I might have found a little bug. After I've drawn a polyline and want to draw another polyline, I click the icon but now the drawtool isn't a polyline but just a line. But if I click antother icon and then click the polyline icon again then the drawtool will be a polyline again. This behavior is the same in your sample in the code gallery, maybe you want it that way, but to me it doesn't make sense, so I looked at the code and found out that: when enterstate drawToolsLine DrawTool.POLYLINE is passed to the activateDrawTool function. <s:State name="drawToolsLine" enterState="activateDrawTool(DrawTool.POLYLINE, null)"/> but when the image is clicked DrawTool.LINE is passed to the activateDrawTool function. <mx:Image click="{(currentState == 'drawToolsLine')?activateDrawTool(DrawTool.LINE, null):currentState = 'drawToolsLine'}" ...... I guess it's supposed to be the same in both these cases, DrawTool.POLYLINE if that is the expected tool. I changed the code to this and it works as I want it to. Just wanted to report this because to me it looks like a typo or something like that...
... View more
10-27-2010
05:38 AM
|
0
|
0
|
550
|
POST
|
I've created a bookmark DropDownList in the HeaderControllerWidget in my FlexViewer 2.1 site. I looked at the bookmark widget, so I specifies the extent in the xml file in the same way the bookmarkWidget does. There is other ways to do that also, but to specify them in the xml file will make it easier to change the extents later. After reading the extents and names from the xml file i create an ArrayCollection which I use as dataProvider for the DropDownList. In the DropDownList tag you should add something like: change="SomeFunction(event)" And in that function you can add the code for zooming to some extent.
... View more
10-26-2010
03:32 AM
|
0
|
0
|
903
|
POST
|
Thanks for your answers! I'll settle for turn off the drawToolTips until the 2.2 version,
... View more
10-15-2010
12:41 AM
|
0
|
0
|
298
|
POST
|
Hi, I want all labels, toolTips etc. in my Flex Viewer 2.1 application to show Swedish words, and of some weird reason that is not one of the six supported languages 🙂 Is it possible to somehow make my own Localization? I'm thinking that won't be so easy, therefore I've been trying to find all strings and change them into Swedish in the code. Right now I really can't find any way to change the drawing toolTips like "Click to start drawing". Anyone know how to do this? Until I've been able to do that I thought I would just turn off the toolTips, I found the showDrawTips property in the API Reference but I haven't been able to figure out how to use it in the draw widget for example.
... View more
10-14-2010
07:46 AM
|
0
|
3
|
774
|
POST
|
I'm not skilled enough to figure out how to use the mouseX and localToGlobal() to get the coordinates from a ContextMenuEvent. But I added an EventListener for the MENU_SELECT map.contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, menuSelectHandler); And put Roberts code to access the coordinates from the coordinatewidget in the menuSelectHandler function. Except I don't set the Clipboard just store it in another String that is set to Clipboard when the user clicks that specific menu item. I thought that made better sense 🙂 So now the correct coordinates are copied, so that works for now. Thanks Dasa and Robert.
... View more
10-13-2010
02:30 AM
|
0
|
0
|
554
|
POST
|
I thought this worked, until I realized this morning that the coordinates that is copied to the clipboard is not the point were I right clicked but the point behind the context menu were I click when selecting the copy coordinates menu item. The coordinates in the coordinate widget seems to "freeze" when I right click the map, but apparently they're not, not the ones I'm getting from the function that is triggered from my context menu item. I guess I somehow need to first save the coordinate when right clicking and then access that saved coordinates from the functions that's triggered from my context menu item. Does anyone have a solution for this??
... View more
10-08-2010
03:19 AM
|
0
|
0
|
554
|
POST
|
Hello! I need to quickly migrate a couple of my old SFV 1.3 widgets to the new 2.1 Viewer, I used the new HelloWorldWidget and added new spark components. Then I copied and pasted most of the code and went through all errors and fixed them as they occured. I think I've made almost everything working except one thing. I have my own InfoWindowRenderer component that I use for a grahics layers which is populated by a query result. In the InfoWindowRenderer component i use {data.SOMETHING} for the text of some labels and so on to show the attributes of the current graphic. But I'm getting the error "1120: Access of undefined property data." If I changes the label text to a static string, everything works, except of course the infowindow doesn't show what I want... I don't never understood exactly were this data.SOMETHING came from when I first wrote the code, I just used code from other examples. Am I supposed to define the property data somehow or is there another way? What would be the best way to show meaningful infoWindows for my graphics in the new 2.1 Widget??
... View more
10-07-2010
04:06 AM
|
0
|
1
|
1045
|
POST
|
That's great news! Thanks a lot Robert for continuing sharing so much of your great work!
... View more
10-06-2010
12:05 AM
|
0
|
0
|
465
|
POST
|
What about the Enhanced Draw Widget? Is that on the migration list as well? I really like the ability to save and load the drawings to/from a file, and the ability to remove one single graphic and not clear the entire graphics layer.
... View more
10-04-2010
11:05 PM
|
0
|
0
|
465
|
POST
|
Thanks Robert! That works great, even though I don't completely understand how it works, but am happy as long as it works 🙂
... View more
10-04-2010
10:49 PM
|
0
|
0
|
554
|
POST
|
Hello! In my SFV 1.3 site I added the functionality to right click the map and copy coordinates to clipboard, based on code I found in the old forum, I think it was code from Robert Scheitlin. I want the same thing in my new FlexViewer 2.1 site, I've come so far that I've added a custom item to the context menu that copies a hard-coded string to the clipboard. I need some help figuring out how to get the coordinates, from the mapmanager.mxml. In the SFV 1.3 the coordinates came from the banner (roberts modified banner that shows the coordinates) and the code looked like this: var myString:String = SiteContainer.getInstance().controller.banner.mapXY; I'm using the Coordinatewidget and I guess the best way is to get the coordinates from the 'coords' label in CoordinateWidget. But I don't know how to access that wigdet and label from the mapmanager.
... View more
10-04-2010
05:22 AM
|
0
|
8
|
1553
|
Title | Kudos | Posted |
---|---|---|
1 | 10-14-2015 01:59 AM | |
1 | 06-13-2024 12:31 AM | |
1 | 03-28-2024 01:07 AM | |
1 | 03-27-2024 04:09 AM | |
1 | 06-13-2024 12:22 AM |
Online Status |
Offline
|
Date Last Visited |
yesterday
|