Quantcast
Channel: Forums - ArcGIS Viewer for Flex
Viewing all 2097 articles
Browse latest View live

query widget, sort results by newest first.

$
0
0
HI I am using the ArcGIS app. builder for Flex. I want to ask if it is possible to sort the results from the query widgets by newest first. I use the standard query widget included in the app builder with an editable feature service and a refreshing time of 1 minute. Until now the results are sorted with the oldest entry first and not the newest entry first as I would like.
Any help would be appreciated. Thank you,

Showing .html in Flex Viewer, .html embedded popups

$
0
0
Hi I was hoping someone on here could help me.
I have recently used ArcGIS viewer for flex and Adobe flash builder to build and host an online map.
Now I want to show popups of panoramic photos I have taken in the field which are in .html form. So basically I need a popup or widget which can retrieve these from my local drive and display them.

I first wrote a query widget using the “QueryWidget_Louisville_TrafficCams.xml” as my base. This was my widget code
<?xml version="1.0" ?>
<configuration label=Photos">
<layer>http://MyMap </layer>
<titlefield>DESCRIPT</titlefield>
<linkfield>"C:\My project photo storage\Photos\"+Hyperlink_Relative_Path</linkfield>
<fields all="false">
<field name="DESCRIPT"/>
<field name="Hyperlink_Relative_Path"/>
<field name="FIELDDATE" alias="Taken"/>
</fields>
<filterfield>
<name></name>
<alias></alias>
</filterfield>
<refreshrate></refreshrate>
<zoomscale>18000</zoomscale>
<query>1=1</query>
</configuration>

this is showing is the “Hyperlink_Relative_path” field information rather than retrieving the actual .html image.

I also wrote a popup
<?xml version="1.0" ?>
<configuration>
<title>{Hyperlink_Relative_Path}</title>
<description>
<![CDATA[<a href='C:\My project photo storage\Photos\Hyperlink_Relative_Path'><u>LINK</u></a>
<p><li>Description = {DESCRIPT}</li>
<li>PHOTOTYPE = {PHOTOTYPE}</li>
<li>Hyperlink_Relative_Path = {Hyperlink_Relative_Path}</li></p>
]]>
</description>

<fields>
<field name="DESCRIPT"/>
<field name="PHOTOTYPE"/>
<field name="Hyperlink_Relative_Path"/>
</fields>

</configuration

This shows “Link” text to click however it is dead, Does not retrieve anything.
Could anyone help me with where I am going wrong or with another solution to displaying “.html” popups in flex viewer?

TOC Widget description Event

$
0
0
I am using the TOC Widget and have it configured to usenewesridescription=false.

This way I get the nice little popup window with the service description information.

I have included a link to a web page in the description, and can click from the popup to follow the link.

I would like it to close the description popup when I click on the link, but not able to figure out where that popup is being handled so that I could try to put an onClick listener or something so that I can have it close the popup on click of the link.

Does this sound like a simple modification? If so, any idea where I would go to capture/handle this?

Thanks,

R_

SFV State in Flex 3.0

$
0
0
I followed an old thread from 2011 that talked about how to saving user sessions such as map extent and layer on/off etc., downloaded the source code from version 2.3 and tried to move this function to my flex 3.0 project. After updating the source code, I can't see any changes and there is no error in the source code. I attached my source code here, please help!

Amy
Attached Files

Convert symbol variable

$
0
0
I'm trying to convert a symbol type variable to load in an image type variable to appear in my widget, but i'm failing at some point. Does anyone can help? thanks by the way:)

Dynamic Legend Widget ArcGIS online hosted Layer Problem

$
0
0
Was this widget meant to work with ArcGIS online hosted layers? I have both the original and the dynamic legends in my application. Original shows my online layer, dynamic does not. Using Flex.

Thanks in advance for assistance.

Geoportal+flex3

$
0
0
I,m using flex viewer version 3 and I,m looking for geoportal widget. but I can not find any widget that be compatible with flex 3. what should I do?

Change background color of Edit widget: select template to create feature

$
0
0
I would like to lighten the background color of the Edit widget where you select template to create feature.
My symbols for features do not show up well on a dark background.
Thanks,

Change the selected symbol size in feature template

$
0
0
Hi all,

I am using the editor tool to draw line in th application. However, when I draw the lines it appears to be really thick. The service I published for this has the size configured to be 1 pt, however ArcGIS 10.1 somehow defaults it to 6 pt for some reason. As a reson I was thinking to change the size of the graphics symbol when feature template is selected....however I am not able to get hold of the symbol size nor override it. In the Editor widget we have
Code:

case (Geometry.POLYLINE):
                                                {
                                                        //var drawLineSymbol:Symbol = new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID, 0, 1, 1);
                                                        //var drawLineSymbol:Symbol = new SimpleLineSymbol();
                                                       
                                                       
                                                        if (event.selectedTemplate.featureLayer.renderer != null)
                                                        {
                                                               
                                                                drawTool.lineSymbol = event.selectedTemplate.featureLayer.renderer.getSymbol(event.selectedTemplate.featureTemplate.prototype);
                                                        }
                                                        else if (event.selectedTemplate.featureLayer.symbol)
                                                        {
                                                                drawTool.lineSymbol = event.selectedTemplate.featureLayer.symbol;
                                                        }
                                                       
                                                        drawTool.activate(DrawTool.POLYLINE);
                                                        break;
                                                }

I was trying to get hold of drawTool.lineSymbol's width property like
Code:

drawTool.lineSymbol.width
. However I cannot get it. Is there any other way to do this. Thanks.

How to Convert the Global Coordinate System to State Plain Coordinate system

$
0
0
I have a coordinate that I would like to convert to a state plain coordinate. My current coordinate is in the global coordinate system. Is there a formula that can be used for this conversion? If anyone can help me I would appreciate it. An example coordinate is:
Longitude: 2233778.763141667
Latitude: 266801.48784685344


Thanks,
Ray

Hyperlink via virtual directory to web application?

$
0
0
I'm hoping that someone might have an idea how to go about this.

I have a report built in SQL Server 2008 R2 Reporting Services and am trying to link to the report via a pop up in the Flex Viewer application. I understand that when I hyperlink to files via the Flex Viewer application, I need to use a Virtual Directory which points to the physical location of the file. The problem is that the 2008 R2 Reporting Services don't have a physical location that I can direct a virtual directory.

I have the hyperlink setup correctly in my popup, if I copy and paste it from the pop up window into a web browser, the report will open. If I click the hyperlink directly in the popup, the web address will open, but a few extra characters get thrown into the address, erroring it out. It makes me think that setting up virtual directory to the location would fix things.

To review, I'm trying to create a Virtual Directory to a web application that doesn't physically exist. ie. I'm trying to link to "http://servername/ReportServer/Pages/ReportViewer.aspx?%2fEnvironmental%2fPoint+Search&rs:Command=Render&SiteID=point-30" vs. C:\ReportServer\Pages\ReportViewer . . . .

Does anyone know how to create a Virtual Directory to a web application?

Thank,
Matt

Can Flex Viewer 1.x access ArcGIS Server 10.1?

$
0
0
Hi, my organization's Flex Viewer is still based on Flex Viewer 1.x with Flex SDK 3.4. It has been working fine with ArcGIS Server 9.3 and 10.
We are still trying to migrate the Viewer to the latest Flex Viewer 3 version, but have not completed yet for some reasons, and I am wondering if the current Viewer on 1.x can run on map services published by ArcGIS Server 10.1. Does anyone know about this?

Thanks,

Enhanced Bookmark - Save Bookmarks

$
0
0
Dear Colleagues;

I'm using the Enhanced Bookmark Widget (http://www.arcgis.com/home/item.html...d2cc6475f24a4e) and it's great. But i'm trying to make a little adaptation with no success. Instead save only the user-defined bookmarks I want to save all bookmarks - including the bookmarks defined in xml by the developer. By default it's not possible (only user defined), but it's quite simple, I guess. If someone can give me a hand I will be greatful. Below part of the mxml the execute the save function.


Code:

// mjk - Enhanced Bookmark
                        /**
                        * Parses bookmarks from the default widget config file or
                        * a file loaded by the user. In the case of a user created
                        * config file set isUserCreated to true so that they behave the
                        * same as bookmarks added at run time.
                        **/
                        private function parseBookmarkConfig(config:XML, isUserCreated:Boolean):void
                        {
                                if(config)
                                {
                                        var bookmarkList:XMLList = config..bookmark;
                                        var length:int = bookmarkList.length();
                                       
                                        if(length < 1)
                                        {
                                                Alert.show("Nenhuma marcação válida encontrada!", wTemplate.widgetTitle);
                                                return;
                                        }
                                       
                                        for (var i:int = 0; i < length; i++)
                                        {
                                                // mjk- Enhanced Bookmark
                                                var comment:String = bookmarkList[i].@comment;
                                       
                                                var name:String = bookmarkList[i].@name;
                                                var extent:String = bookmarkList[i];
                                                var extArray:Array = extent.split(" ");
                                                var bookmark:Bookmark = new Bookmark();
                                       
                                                //mjk - Enhanced Bookmark
                                                bookmark.comment = comment;
                                                bookmark.userCreated = isUserCreated;
                                               
                                                bookmark.name = name;
                                                bookmark.xmin = Number(extArray[0]);
                                                bookmark.ymin = Number(extArray[1]);
                                                bookmark.xmax = Number(extArray[2]);
                                                bookmark.ymax = Number(extArray[3]);
                                                bookmarkAL.addItem(bookmark);
                                               
                                                // mjk - Enhanced Bookmark
                                                // Add user created bookmarks to bookmarkSOAL
                                                if(isUserCreated)
                                                {
                                                        bookmarkSOAL.addItem(bookmark);
                                                }
                                        }
                                }
                        }
                       
            private function addBookmark():void
            {
                var name:String = txtName.text;
                if (name)
                {
                    var ext:Extent = map.extent;
                    var bookmark:Bookmark = new Bookmark();
                    bookmark.name = name;
                                       
                                        // mjk - Enhanced Bookmark
                                        bookmark.comment = txtAreaComment.text;
                                       
                    bookmark.userCreated = true;
                    bookmark.xmin = Number(ext.xmin.toFixed(4));
                    bookmark.ymin = Number(ext.ymin.toFixed(4));
                    bookmark.xmax = Number(ext.xmax.toFixed(4));
                    bookmark.ymax = Number(ext.ymax.toFixed(4));
                    bookmarkAL.addItem(bookmark);
                    bookmarkSOAL.addItem(bookmark);
                    saveBookmarks();
                    txtName.text = "";
                                       
                                        // mjk - Enhanced Bookmark
                                        txtAreaComment.text = "";
                                       
                    bkmList.addEventListener(EffectEvent.EFFECT_END, bkmList_effectEndHandler);
                    showBookmarksList();
                }
                else
                {
                    Alert.show(errorLabel, wTemplate.widgetTitle);
                }
            }

            private function bkmList_effectEndHandler(event:EffectEvent):void
            {
                bkmList.removeEventListener(EffectEvent.EFFECT_END, bkmList_effectEndHandler);
                // scroll to the bottom
                bookmarkDG.verticalScrollPosition += bookmarkDG.layout.getVerticalScrollPositionDelta(NavigationUnit.END);
            }

            private function removeBookmark(event:Event):void
            {
                var bookmark:Bookmark = ItemRenderer(event.target).data as Bookmark;
                bookmarkAL.removeItem(bookmark);
                bookmarkSOAL.removeItem(bookmark);
                saveBookmarks();
            }

            private function saveBookmarks():void
            {
                if (bookmarkSO)
                {
                    try
                    {
                        bookmarkSO.flush();
                    }
                    catch (err:Error)
                    {
                        trace(err);
                    }
                }
            }

            private function showBookmark(event:Event):void
            {
                var bookmark:Bookmark = ItemRenderer(event.target).data as Bookmark;
                var ext:Extent = new Extent(bookmark.xmin, bookmark.ymin, bookmark.xmax, bookmark.ymax);
                map.extent = ext;
            }
                       
                        // mjk - Enhanced Bookmark
                        /**
                        * Saves user created bookmarks to a file.
                        * The xml schema is the same as the widgets.
                        **/
                        private function saveBooksMarksToFile():void
                        {
                                if(bookmarkSOAL)
                                {
                                        var xml:XML = createBookmarksXML();
                                       
                                        if(!xml) return;
                                       
                                        fileReference = new FileReference();
                                        fileReference.save(xml, "LocaisWebSIG.txt");
                                }
                        }

Generating Reports, Statistics Widget

$
0
0
Hi there,

I have a flex viewer site which is ultimately an inventory report I am looking for a widget which can display statistics, generate reports.
The Charts/Statistics widget is unsuitable for the way I want to display my data. I would be looking for something which could display data in a table something like this.

Equipment Type- Quantitiy
Equipment Type A- 2
Equipment Type B- 7
Equipment Type C- 5
Equipment Type D- 9

I have a polygon feature layer which with a unique GUID, inventory is contained in a dBase folder with the GUID linked to inventory. My end goal is to select a polygon feature which will generate a report in a popup window showing a table similar to the example above.

We have used the method of being able to display PDF inventory reports in the past, I am trying to create a method of generating live reports as inventory gets updated without having to replace PDFs. Is this possible?

My data is setup to generate Crystal Reports offline however as much as I have looked I cannot find a widget with these capabilities. Does it or anything similar exist out there in widget form for generating reports/statistics?

Thanks in advance,
Liam

Why is Legend Widget still updating?

$
0
0
I thought I was getting this figured out but it is not doing what I thought.

In the LegendWidget there is the code

map.addEventListener(MapEvent.LAYER_ADD, mapLayerAddHandler, false, 1);
map.addEventListener(MapEvent.LAYER_REMOVE, mapLayerRemoveHandler, false, 1);


If I comment out this code the legend still updates itself. How does it do this?

If I comment out the line myLegend.map = map; after these lines that does stop it from updating the legend. So maybe there is another event buried in the map? Not sure why there would be two.

I want to know because I want to add a layer to a second TOC when it is checked in the first one. I thought I would create this event and then work on how to add it to the second TOC (which may be tough since it seems to always connect to the map).

Thanks

doug

Can I change the color of text in the event over ?

$
0
0
Hi all, someone could tell me where I can change the color of the text, when I pass the mouse, in the configuration I could only customize the rollover.

Thanks

User inputting a static image

$
0
0
Hi,

I'm trying to implement a widget which allows the user to select an image, from a predefined set of images, and then select where on the map they would like to place their image. The problem is that I dont know where to start. Would somebody be able to outline the steps or direct me to perhaps some sample code in order to get started?

Thanks

ArcGIS Viewer for Flex - Application Builder, few questions/problems

$
0
0
Hello! I'm new in this forum, so please be forgiving for me :)

I am creating own web apllication for my engineer thesis. I have almost done my project, but there are few not so big problems to solve. I hope that anybody can help me.

At the begining I want to say that I am creating app in ArcGIS Viewer for Flex version 3.0. I am not very good at programming especially in flex or flash, so I chose it, because of easines.

I got my application ready but.

1. I want to change units at scalebar. Now i have meteres and feets, but I want only meters(we don't use feets units in Poland). I know that the attribute "scalebarvisible" is responsible for scalebar, but I am able to change only visible parameter.
2. Is there option to put a scale text instead of scalebar?
3. When I use a Query widget all polygons, that I put in Query are filled with red colour. I don't want it, but I can't change it. Maybe someone know how to do?
4. The same situation with Search widget. Don't want red colour filling!
5. I want delete search with selecting feature by drawing, or make select by attribute visible firstly in Search Widget. Is it possible?
6. I want to put a North Arrow at my application.

As I said I am not very good at programming, so If it possible I don't want use flashbuilder etc. if it's not required.
I put attachments with print screens, so you can see what the problems are.

Please for any solves, informations, tips or anything.
I will be really greatful!

Greets

Maciej :)
Attached Thumbnails
Click image for larger version

Name:	query.jpg‎
Views:	N/A
Size:	94.7 KB
ID:	19777   Click image for larger version

Name:	scalebar.jpg‎
Views:	N/A
Size:	3.4 KB
ID:	19778  

channel security error

$
0
0
I developed an application using flex viewer 3.0. it runs fine on my server. but when i run the same application on the my office
intranet giving the IP address of the application i have received following error:

mymap layer failed to load (my map is name of basemap mentioned in the config file of my application.)
Fault code :Channel.Secruity.Error
Secruity Error using url

any clue what could be the remedy......

WMS layer in flex viewer 2.5

$
0
0
I try to connect to WMS http://cartorisque.prim.net/wms/67? in flex viewer 2.5. Here is the code in config.xml file :

<layer label = "Cartorisque WMS 67" type = "wms" visible = "false" alpha = "1" wkid = "2154" skipgetcapabilities = "true" visiblelayers = "ALEA_INONDATION_SYNTHESE,ALEA_SEISME_SYNTHESE" version = "1.3.0"
url = "http://cartorisque.prim.net/wms/67?">
</ layer>

The projection of my Basemaps are EPSG:3948, but the WMS server only supports EPSG:2154.

But it does not work. I get an crossdomain.xml error on the WMS server (seen in Fiddler). I thought the argument skipgetcapabilities = "true" allowed around it.

Thank you in advance.

Sasha Weber
Viewing all 2097 articles
Browse latest View live