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

Update TOC after layers visibility changed in ActionScript in MapManager

$
0
0
Hi:

I have added code to automatically save the current settings (for example, visible layers, map extent... ) when the Browser window is closed. Next time when FlexViewer is launched, the previous settings will be loaded automatically. This part works very well.

The problem is the TOC widget when loaded always set the CheckBoxes based on the Map Service sublayers' DEFAULT VISIBILITY.

I looked through this forum. Some suggest to add a customized Event Listener in TocItem. But the code to load the user's previous settings is added in MapManager.mxml. Based on the "Application life cycle", MapManager loads the map services first based on the configuration settings. Then the WidgetManager loads the widget's Flash files from the uniform resource locators (URLs) based on the configuration settings.

So even I dispatch a customized event in MapManager.mxml, the TOC widget won't catch it as it is not loaded yet.
Is it possible to get the visible layers in current map instead of using the Default Visibility when create the TOC item at initalization?

Any insights?

Thanks a lot!

Rose

Accessing the ContentNavigator in code

$
0
0
Good day.

Using Flex Viewer 3.0 / Flash Builder 4.6
I have the need to call the public close() method on the ContentNavigator of my info window (attached to a feature layer).
All my efforts to trace through the API documetation, and debugging into the map and layer objects themselves, ends up at a generic abstract point (such as a factory interface).

I guess my main question is, what object contains the content navigator?
I'm looking for something like myFeatureLayer.infoWindowRenderer.contentNavigator.close();

Thanks in advance.

Creating Multipoint and adding graphic through ActionScript

$
0
0
Hi,

I am trying to create MultiPoint through ActionScript and want to add graphic on the map, but it throwing error,

TypeError: Error #1034: Type Coercion failed: cannot convert []@1022e3a1 to com.esri.ags.geometry.MapPoint.
at com.esri.ags.symbols::SimpleMarkerSymbol/draw()[C:\checkout\flex_api2\api\src\com\esri\ags\symbols\SimpleMarkerSymbol.as:406]
at com.esri.ags::Graphic/drawWithSymbol()[C:\checkout\flex_api2\api\src\com\esri\ags\Graphic.as:496]
at com.esri.ags::Graphic/commitProperties()[C:\checkout\flex_api2\api\src\com\esri\ags\Graphic.as:452]
at mx.core::UIComponent/validateProperties()
at mx.managers::LayoutManager/validateProperties()
at mx.managers::LayoutManager/doPhasedInstantiation()
at mx.managers::LayoutManager/doPhasedInstantiationCallback()


can any one please suggest me what is the problem in this code to add graphic on the layer .

Here is my Code.

var myMulPoint:Multipoint = new Multipoint(
[[
new MapPoint(1447100, 7477200),
new MapPoint(1447100, 7477200),
]], new SpatialReference(102100));

var myGraphicMulPoint:Graphic = new Graphic();
myGraphicMulPoint.geometry = myMulPoint;
myGraphicMulPoint.symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_TRIANGLE, 22, 0x009933);
myGraphicsLayer.add(myGraphicMulPoint);

eSearch Widget - autocomplete search

Multiple Flex Viewer Versions on Server

$
0
0
To All Flex Viewer Users:

Can you have multiple versions (builds) of the Flex Viewer software installed on the same server?

If you have an older version of Flex Viewer on a server and then install a newer version, will only the new version be available to the Flex Viewer applications stored on that server?

Features not loading in Web Map

$
0
0
Greetings,
I have run into a little spot of bother regarding the ArcGIS viewer for Flex. I am trying to display a points layer from one of our published map services. there are roughly 3500 Features. Nearest I can tell I have set up everything correctly on the server side. the mxd behind the service is displaying all of the points I need to see and the MSD has been republished.
The web all itself will only display roughly 60% of these points. when I run the search widget all of the points can be accessed. If I do a graphical search all of the points will show up with the binoculars icon. To me it looks like the features I have loaded recently (Have higher Object ID's) are not showing up.
Any thoughts?


Thanks,
Dave

eSearch Wiget for Flex 2.5 spacial search

$
0
0
Having a bit of a hiccup with the "spacial search" or "buffer" section of the super awesome enhanced search tool under flex viewer 2.5 (the rest of the tool works as expected).

After selecting a parcel, then clicking the "Spacial Search" nothing happens when you click "apply buffer" button.

It was working with ArcGIS 10.0
not working on 10.1.

Any ideas where i should be looking?

Below is the appropriate section of my SearchWidget.xml

Code:

        <spatialrelationships>
                <!-- possible spatial relationships esriSpatialRelIntersects | esriSpatialRelContains
                        | esriSpatialRelCrosses | esriSpatialRelEnvelopeIntersects | esriSpatialRelIndexIntersects
                        | esriSpatialRelOverlaps | esriSpatialRelTouches | esriSpatialRelWithin currently
                        unavailable: esriSpatialRelRelation -->
                <spatialrelationship>
                        <name>esriSpatialRelContains</name>
                        <label>entirely contained in</label>
                </spatialrelationship>
                <spatialrelationship>
                        <name>esriSpatialRelIntersects</name>
                        <label>interssected by</label>
                </spatialrelationship>
                <spatialrelationship>
                        <name>esriSpatialRelEnvelopeIntersects</name>
                        <label>intersected by envelop of</label>
                </spatialrelationship>
        </spatialrelationships>
        <bufferunits>
                <bufferunit>
                        <name>UNIT_FOOT</name>
                        <label>Feet</label>
                </bufferunit>
                <bufferunit>
                        <name>UNIT_STATUTE_MILE</name>
                        <label>Miles</label>
                </bufferunit>
                <bufferunit>
                        <name>UNIT_METER</name>
                        <label>Meters</label>
                </bufferunit>
                <bufferunit>
                        <name>UNIT_KILOMETER</name>
                        <label>Kilometers</label>
                </bufferunit>
        </bufferunits>
        <enabledatagridinteractionwithwidget>true</enabledatagridinteractionwithwidget>
        <toleranceforpointgraphicalselection>6</toleranceforpointgraphicalselection><!-- value is in screen pixels -->
        <tolerancebydefault>false</tolerancebydefault>
        <spatialreference>102003</spatialreference>
        <zoomscale>2400</zoomscale>
        <geometryservice>http://10.0.20.11:6080/arcgis/rest/services/Utilities/Geometry/GeometryServer</geometryservice>
        <csvseparator>,</csvseparator>
        <disablebuttons></disablebuttons><!--possible values one or more not all four search types comma separated text,graphic,spatial,grid,datagrid -->
        <defaultselectionoption>textInput</defaultselectionoption><!--possible values only one graphicalInput or textInput or spatialInput -->
        <enabledrawgraphicbutton>true</enabledrawgraphicbutton>
        <enablebuffergraphicbutton>true</enablebuffergraphicbutton>
        <selectedgraphicaltool></selectedgraphicaltool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
        <multipartgraphicsearch>false</multipartgraphicsearch>
        <floatorfixed disablerelatestabinfixed="false">float</floatorfixed><!-- possible values are fixed and float -->
        <relatetooltip>Show Relates</relatetooltip>
        <relateicon>widgets/eSearch/assets/images/i_relate.png</relateicon>
        <labels>
                <bufferusergraphics>Buffer Graphic</bufferusergraphics>
                <norelatesfound>No related features found for: </norelatesfound>
                <norelatesfoundalerttitle>No Results</norelatesfoundalerttitle>
                <addtolerance>Add search tolerance to point selection</addtolerance>
                <existingdrawgraphicslabel>Use Existing eDraw Widget Graphics</existingdrawgraphicslabel>
                <existingbuffergraphicslabel>Use Existing Point Buffer Widget Graphics</existingbuffergraphicslabel>
                <graphicalsearchlabel>Graphical Search</graphicalsearchlabel>
                <textsearchlabel>Text Search</textsearchlabel>
                <resultslabel>Results</resultslabel>
                <layerlabel>Search Layer:</layerlabel>
                <layerfieldlabel>Search Layer Field:</layerfieldlabel>
                <nolayerlabel>No search layer defined.</nolayerlabel>
                <submitlabel>Search</submitlabel>
                <pointlabel>Select by Point</pointlabel>
                <linelabel>Select by Line</linelabel>
                <rectanglelabel>Select by Rectangle</rectanglelabel>
                <polygonlabel>Select by Polygon</polygonlabel>
                <clearlabel>Clear</clearlabel>
                <loadinglabel>Loading...</loadinglabel>
                <selectionlabel>Features Selected:</selectionlabel>
                <gridresultslabel>Show Results in Grid</gridresultslabel>
                <csvdefaultname>Selected Records</csvdefaultname>
                <relatescsvdefaultname>Related Records</relatescsvdefaultname>
                <exportbtnlabel>Export...</exportbtnlabel>
                <export2csvoptionlabel>Export to CSV...</export2csvoptionlabel>
                <export2txtoptionlabel>Export to Txt...</export2txtoptionlabel>
                <bufferlabel>apply a search distance:</bufferlabel>
                <spatialsearchlabel>Spatial search</spatialsearchlabel>
                <applybufferlabel>Apply buffer</applybufferlabel>
                <searchlayerlabel>Search entities of:</searchlayerlabel>
                <enablemultipartsearch>enable multi-part graphics</enablemultipartsearch>
                <zoomalllabel>Zoom</zoomalllabel>
                <zoomalltip>Zoom to all results</zoomalltip>
                <bufferalpha>Adjust buffer alpha</bufferalpha>
                <buffercolor>Select buffer color</buffercolor>
        </labels>
        <symbols>
                <simplefillsymbol color="0xff0000" alpha="0.5">
                        <outline color="0xff0000" alpha="0.8" width="2" />
                </simplefillsymbol>
                <!-- You can have one or the other, either simplemarkersymbol or picturemarkersymbol
                        defined for your point results NOT BOTH. picturemarkersymbol will override
                        simplemarkersymbol if you do not have it commented out. -->
                <!--<simplemarkersymbol style="square" size="12" color="0xff0000" alpha="0.5"
                        xoffset="0" yoffset="0" angle="0"> <outline style="solid" color="0x000000"
                        alpha="1" width="1"/> </simplemarkersymbol> -->
                <picturemarkersymbol url="assets/images/i_search.png" height="30" width="30" xoffset="0" yoffset="0" />
                <simplelinesymbol color="0xff0000" alpha="0.8" width="2" />
        </symbols>

Flex Viewer 2.X Draw and Measure Text Color Default

$
0
0
Is there any way to change the default color of the "text" in the draw & measure tool to something other than black?

Route Widget pdf

$
0
0
Does anyone out there know how to change the size of the map on the pdf? Right now if I select the map to print with the route, the map shows up as a portion of the page but if I wanted the map to take up the whole page -- is there a place I can reset that? Or if I just wanted the route to show up on the map without the directions -- is there a way that I can make that a selectable choice?

I've tried using the advanced printing option but the advanced printing will not print the route on the map.

Any ideas or suggestions or other ideas out there?

Thanks,

Patricia

Grouping Cached\Tiled Layers in TOC or Layer list

$
0
0
I'm working with very large datasets, and can't maintain Server performance with dynamic layers, therefore need to use Tiled.

I've had the request to group the different tiled services so the user can turned off many with one checkbox, similar to dynamic functionality within the mxd. I've played with Non-fused caches, but my understanding is they will not be in 10.1.

What I want to do, is be able to turn off a Parent Group and have all the Tiled Services turn off as well.


Parent Group A
Tile Service 1
Tile Service 2
Tile Service 3
Tile Service 4
Tile Service 5

Parent Group B
Tile Service 6
Tile Service 7

Has anyone been able to do this before? It doesn't need to be dynamic.

Thanks in advance,
Matt Shetzer

eSearch Widget 3.0.12: clearing a userlist

$
0
0
Robert, is it possible to clear any userlists when clearing a text search on the eSearch widget?

An example on your site of this is to choose Road Centerlines > Road Surface > and any value other than "Tar and Gravel". Clearing the search does not revert the userlist to its original display.

I have a userlist with isvaluerequired set to false. It'd be great to be able to reset the userlist to a blank value when the clear button is clicked.

Thanks much.

Point Buffer Widget Enhancement Request

$
0
0
Robert,

I use the Point buffer widget a lot and think it is an excellent widget. Have you thought about extending it to also allow the user to buffer lines and polygons?

Regards

Anthony

TOC Widget vs Dymanic Legend Widget background color

$
0
0
Really like the combined dynamic legend and More into the TOC Widget. However, I really like the white "internal" background on the Dynamic Legend Widget.

Would it be fairly easy to add this to the TOC widget so that the "legend" portion of the TOC widget also has the white background?

Attachment 18658

Thanks,

R_
Attached Thumbnails
Click image for larger version

Name:	untitled1.jpg‎
Views:	N/A
Size:	224.6 KB
ID:	18658  

TOC Widget Bug???

$
0
0
Hi Robert,

I'm using your TOC Widget and noticed something unusual, specifically when re-ordering layers. It seems to only happen when I try to exclude layers. The initial layer movement pushes the layer either to the bottom or jumps several spots. However, after the initial try, it works the way it's supposed to. I'm not sure if this is a bug or something that I'm doing.

Regards,
James

Editing the look of the viewer

$
0
0
I am trying to customize the 'More" button that appears in the viewer in the top right hand corner next to the "Basemap" button. Does anyone know where these types of items can be edited?

Thanks in advance.

Attachment_Inspector in Widget

Images do not display in identify widget pop up

$
0
0
Hi all,

I am using the identify widget v 3.0.1. I have successfully set it up to identify a point dataset, displaying some items only in the pop up. I now want to display photos in the pop up. It does not, however, display such images even when I have, to my knowledge, been setting up the config file correctly (see below). Any help much appreciated.

Yes, the map service is set up with a field called 'photo' containing the file name and extension of the photos so it matches up with the prefix in the syntax of the identify widget below. I checked that this field is accessible to the widget by adding it into the list to be displayed when one uses the widget (see bolded syntax below). Strangely, this then caused the pop up to behave as though it were displaying the photos, but only a frame with a broken image symbol in the middle appeared. Also, the red x image in the identify tool results was also replaced with a broken image symbol.

Code:

<?xml version="1.0" ?>
<configuration>
    <betareturngeometryfix>false</betareturngeometryfix>
    <identifylayeroption>visible</identifylayeroption>
    <identifytolerance>5</identifytolerance>
    <defaultzoomscale>5000</defaultzoomscale>
    <keepidentifyactive>true</keepidentifyactive>
    <returngeometryforzoom>true</returngeometryforzoom>
    <enablelineselect>true</enablelineselect>
    <enableextentselect>true</enableextentselect>
    <enablepolyselect>true</enablepolyselect>
    <enablemouseovergraphicsinfo>true</enablemouseovergraphicsinfo>
    <enablemouseoverrecordinfo>false</enablemouseoverrecordinfo>
    <usemaptime>false</usemaptime>
    <infoautoclosemilliseconds>2000</infoautoclosemilliseconds><!-- 2 seconds -->
    <autoactivatedtool>mappoint</autoactivatedtool><!-- possible values are extent or polygon or mappoint or polyline or nothing -->
    <excludebasemaps>true</excludebasemaps>
    <disablepopuplinks>false</disablepopuplinks>
    <labels>
        <zoom2message>Click to Zoom to Point</zoom2message>
        <identifylabel>Identify</identifylabel>
        <resultslabel>Results</resultslabel>
        <descriptionlabel>Use the identify tool to identify features on the map:</descriptionlabel>
        <pointlabel>Identify by Point</pointlabel>
        <linelabel>Identify by Polyline</linelabel>
        <rectlabel>Identify by Rectangle</rectlabel>
        <polylabel>Identify by Polygon</polylabel>
        <clearlabel>Clear</clearlabel>
        <loadinglabel>Loading...</loadinglabel>
        <removeresultmessage>Remove Result</removeresultmessage>
        <idfrom>Identify From</idfrom>
        <noresultsfoundlabel>No Results Found</noresultsfoundlabel>
        <resultsfoundlabel>Results Found</resultsfoundlabel>
    </labels>
    <useproxy><!-- Enter the label of the MapService from the main config.xml -->
        <!--<proxymapservice label="Imagery" />
        <proxymapservice label="Streets" />-->
    </useproxy>
    <layers onlythese="true">
        <layer>
            <name>offices</name>
            <fields>
                <field name="photo" alias="photo" />               
                                                                      <field name="Address" alias="Address" />
                <field name="City" alias="City" popuponly="true"/>
                <field name="State" alias="State" popuponly="true"/>
                <field name="Postcode" alias="Postcode"/>
            </fields>
            <links>
                <link includeinresults="true" field="photo" alias="photo" tooltip="hi this is a tooltip">
                    <linkprefix>https://example.example.com/example/example/example/Documents/photos/test</linkprefix>
                    <linksuffix></linksuffix>
                    <iconfield></iconfield>
                    <iconprefix>https://example.example.com/example/example/example/assets/images/edit_markertool.png</iconprefix>
                    <iconsuffix></iconsuffix>
                </link>
            </links>
            <zoomscale>15000</zoomscale>
            <forcescale>true</forcescale>
        </layer>
        <layer>
            <name>QLD rail</name>
            <fields>
                <field name="FNAME" alias="Name" />
                <field name="WIDTH" alias="Gauge" popuponly="true"/>
                <field name="ELECTRIFIE" alias="Electrified?" popuponly="true"/>
                <field name="OP_STATUS" alias="Status"/>
                <field name="ESRIdate" alias="Date"/>popuponly="true" dateformat="YYYY/MM/DD"/>
            </fields>
            <links>
                <link includeinresults="false" field="" alias="" tooltip="">
                    <linkprefix></linkprefix>
                    <linksuffix></linksuffix>
                    <iconfield></iconfield>
                    <iconprefix></iconprefix>
                    <iconsuffix></iconsuffix>
                </link>
            </links>
            <zoomscale>15000</zoomscale>
            <forcescale>true</forcescale>
        </layer>
    </layers>
   
    <symbols>
        <simplefillsymbol color="0x448ccb" alpha="0.4" style="solid">
            <outline color="0x448ccb" alpha="0.8" width="2"/>
        </simplefillsymbol>
        <simplemarkersymbol style="circle" size="12" color="0x448ccb" alpha="0.8" xoffset="0" yoffset="0" angle="0">
            <outline style="solid" color="0xffffff" alpha="0.8" width="1"/>
        </simplemarkersymbol>
        <picturemarkersymbol url="assets/images/i_info.png" height="30" width="30" xoffset="0" yoffset="0" />
        <simplelinesymbol color="0x448ccb" alpha="0.8" width="2"/>
    </symbols>
</configuration>

raster layer on arcgis viewer

$
0
0
Hi
I have used a kernel density tool on one of layer in map. I then published this a map layer. however when i tried to used this raster layer in the ARCGIS Viewer it send me following error :
invalid feature layer.
but i can add this layer if i use web publication tool from arcgis server , any suggestion
regards

Flex Viewer to HTML5

$
0
0
Any ideas how to convert ArcGIS Flex Viewer to HTML5?

Laurynas

IdentifyWidget 3.0.1 - can you help to config one layer?

$
0
0
I'd like to config the IdentifyWidget 3.0.1 and could use some help. I am running AGS 10.0. Previously I added some layers and widgets that work but I am not sure how to config this IdentifyWidget. I tried to comment out all but the essential code to make just one layer work. Can you look at the attached files? Thanks.
Stew
Attached Files
Viewing all 2097 articles
Browse latest View live