|
POST
|
Bjorn, Just my opinion but I would say you guys need to look at the old SFV and make sure that we are not taking a step backwards in any area. 1. We need to be able to have navigation controls in the header. Just like we were able to add them to menus in old SFV 2. Identify widget 3. Need links to appear in the Search widgets item renderer 4. Chart Widget 5. Not my favorite but query builder widget 6. Routing or directions widget 7. Service area widget 8. Map Service transparency control New Stuff: 1. Make widgets drag-able and re-dockable just like I developed for old SFV. 2. Add WMS and IMS and open street map support to the map manager. 3. Add reverse geocode support to the locate widget. 4. TOC component (in MapswitcherWidget and LayerListWidget) should update their checkboxes when layervisiblity is changed programatically. 5. A configurable basemap fader widget for supporting multiple years of aerial imagery Notice that I didn't shoot for the moon here just some basic and possibly easily reached targets for the final version.
... View more
08-03-2010
06:44 PM
|
0
|
0
|
2113
|
|
POST
|
Daniel, Yes a mxml file is a uncompiled swf. You need to be sure you downloaded the source code for the viewer and not just the compiled version. Make sure you sign in using your global id This is the Viewer's source code link: http://www.arcgis.com/home/item.html?id=3f6a0bfee48949a88df50bf7686ec72a
... View more
08-03-2010
06:04 PM
|
0
|
0
|
1996
|
|
POST
|
Meg, OK here is the code. I hope we are talking about the SFV 1.3 or less
//Replace existing function in MapManager
//basemap menu clicked
private function basemapMenuClicked(event:AppEvent):void
{
var id:String = event.data as String;
var configBasemaps:Array = configData.configBasemaps;
var sellabel:String = configBasemaps[id].label;
for (var i:Number = 0; i < configBasemaps.length; i++)
{
var label:String = configBasemaps.label;
var lyr:Layer = map.getLayer(label);
if (lyr != null)
{
if (configBasemaps.id == id)
{
lyr.visible = true;
if(lyr.id == "Photography"){
this.parentApplication.fader.value = 0;
lyr.alpha = 1;
}else if(lyr.id == "Street Map"){
this.parentApplication.fader.value = 1;
lyr.alpha = 1;
}
}
else
{
if(sellabel == "Photography" && lyr.id == "Vector"){
lyr.visible = true;
lyr.alpha = 1;
map.reorderLayer(lyr.id,1000);
} else {
lyr.visible = false;
}
}
}
}
}
//Replace existing in ConfigManager
//get basemap menu items
private function getBasemapMenuItems(xmlList:XMLList):Array
{
var menuItems:Array = [];
if (xmlList.length() > 1)
{
for (var i:int = 0; i < xmlList.length(); i++)
{
var itemLabel:String = xmlList.@label;
var itemIcon:String = xmlList.@icon;
var itemValue:String = i.toString();
if(itemLabel != "Vector"){
var menuItem:Object =
{
id: i,
label: itemLabel,
icon: itemIcon,
value: itemValue,
action: "basemap"
}
menuItems.push(menuItem);
}
}
}
return menuItems;
}
//Add or maybe replace for you to the index.mxml
//Add import
import com.esri.ags.layers.Layer;
//Add or replace functions
private function faderFade(evt:Event):void
{
var lyr:Layer = SiteContainer.getInstance().controller.map.getLayer("Street Map");
var lyr2:Layer = SiteContainer.getInstance().controller.map.getLayer("Photography");
var lyr3:Layer = SiteContainer.getInstance().controller.map.getLayer("Vector");
lyr.visible = true;
lyr2.visible = true;
lyr3.visible = true;
lyr.alpha = fader.value;
lyr2.alpha = (1 - fader.value);
lyr3.alpha = (1 - fader.value);
}
private function sldrDataTipFormatter(value:Number):String
{
return int(value * 100) + "%";
}
//Add or replace canvas
<mx:Canvas width="150" right="450" top="0" height="35" styleName="WidgetCanvas">
<mx:HSlider id="fader" x="25" y="10" width="100" minimum="0" maximum="1" snapInterval="0.1" liveDragging="true" allowTrackClick="true" enabled="true" change="faderFade(event)" value="1" dataTipFormatFunction="sldrDataTipFormatter"/>
<mx:Image x="7" y="10" width="20" height="20">
<mx:source>com/esri/solutions/flexviewer/assets/images/icons/i_shuttle.png</mx:source>
</mx:Image>
<mx:Image x="125" y="10" width="20" height="20">
<mx:source>com/esri/solutions/flexviewer/assets/images/icons/i_highway.png</mx:source>
</mx:Image>
</mx:Canvas>
I made improvements to the slider code and it's interaction with the basemap menu items so if you already have some of these function be sure to replace them with these new ones. These are the basemaps I am using in this example code:
<basemaps menu="menuMap">
<mapservice label="Photography" type="tiled" visible="false" alpha="1" icon="com/esri/solutions/flexviewer/assets/images/icons/i_shuttle.png">http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer</mapservice>
<mapservice label="Vector" type="tiled" visible="false" alpha="1">http://server.arcgisonline.com/ArcGIS/rest/services/Reference/ESRI_BoundariesPlaces_World_2D/MapServer</mapservice>
<mapservice label="Street Map" type="tiled" visible="true" alpha="1" icon="com/esri/solutions/flexviewer/assets/images/icons/i_highway.png">http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer</mapservice>
</basemaps>
Notice that the code is hard coded to look for certain map service labels like "Vector" and "Photography"
... View more
08-03-2010
04:36 PM
|
0
|
0
|
769
|
|
POST
|
Matthew, Just add this to the MapSwitcherWidget.mxml:
//Add this import
import com.esri.viewer.components.toc.tocClasses.TocMapLayerItem;
//Add this to the very end of the init function
callLater(expandTOC);
//Add this new function
private function expandTOC():void
{
toc.openItems = toc.dataProvider.source;
for each(var item:TocMapLayerItem in toc.openItems) {
if (item.isTopLevel()){
toc.expandItem(item, true);
}
}
}
... View more
08-03-2010
03:20 PM
|
0
|
0
|
1996
|
|
POST
|
graham, Why not pass the region as part of the url parameter?
... View more
08-03-2010
08:00 AM
|
0
|
0
|
860
|
|
POST
|
Jeremy, So for the "Base Map Services Planning Environment Political" tabs at the top of your app that can simply be done by adding the map service or services to the config.xml and you can either control their visibility by using the operational layer control or adding a buttonbar to your map and have the click set the visibility of the layer. All the searching capability can be replicated by just configuring the searchwidget with multiple queries in it's xml configuration file. The save map image code is available in the old forums. The find Lat Long coordinates would not be hard to develop a widget for this. So I would say start by configuring the searchwidget.
... View more
08-03-2010
06:37 AM
|
0
|
0
|
1888
|
|
POST
|
Manolo, I think that you are on the right path. Do you need any specific help?
... View more
08-03-2010
04:22 AM
|
0
|
0
|
1811
|
|
POST
|
Matt, You are definitely missing something simple as CSS has always need to be compiled to a SWF. Just right click on the CSS file and choose compile to SWF if you have not already. There has been some minor changes to CSS in Flex 4 and that is what you are running into with the namespace issue. If you are attempting to use a CSS file that you had working in Flex 3 now in Flex 4 than you have to add namespaces like this at the beginning of the file
/* CSS file - Standard Stylesheet */
@namespace "library://ns.adobe.com/flex/spark";
@namespace mx "library://ns.adobe.com/flex/mx";
@namespace esri "http://www.esri.com/2008/ags";
@namespace viewer "com.esri.viewer.*";
@namespace MapSwitcher "widgets.MapSwitcher.*";
@namespace components "com.esri.ags.components.*";
and then use those name spaces like this:
mx|Alert
{
background-alpha: 0.8; /* same as for viewer|WidgetTemplate */
background-color: #000000; /* controls the panel content area. */
color: white; /* main text color */
corner-radius: 10;
title-style-name: "myAlertTitle";
}
... View more
08-03-2010
04:09 AM
|
0
|
0
|
2161
|
|
POST
|
Jeremy, I would love to help you but as the links you have posted to compare are both terribly dis-functional it is hard to see what you are trying to compare.
... View more
08-02-2010
07:03 PM
|
0
|
0
|
1888
|
|
POST
|
Frank, The zoom in to the parcel is the easy part of the code. if you are not getting the search widget to actually run the query and display the results than there a a half dozen or more things that could be wrong. This is not a very easy thing to setup as there are so many vital steps that have to be done correctly to many different files for this to work. My best suggestion as the developer of the code is to care fully look at each post in the original thread and check and double check that you have completed all of the steps. There are instruction scattered all over the place in the original thread.
... View more
08-02-2010
07:00 PM
|
0
|
0
|
1200
|
|
POST
|
Matthew, Here is what you need in the LiveMapsWidget.mxml in the src/com/esri/solutions/esa/widgets/LiveMapsWidget.mxml if you are using the SFV 1.3 //Add this to the init function
callLater(expandTOC);
//Add this new function (make sure you don't add it inside of another function)
private function expandTOC():void
{
if (expanded)
{
toc.openItems = toc.dataProvider.source;
for each(var item:TocMapLayerItem in toc.openItems) {
if (item.isTopLevel())
toc.expandItem(item,true,true,true,null);
}
}
}
... View more
08-02-2010
06:52 PM
|
0
|
0
|
1574
|
|
POST
|
Justin, So armed with Dasa info all you want to do is Add map.logoVisible = false; as in the example below: protected override function partAdded(partName:String, instance:Object):void
{
super.partAdded(partName, instance);
if (instance == map)
{
map.zoomSliderVisible = false;
map.addEventListener(MapEvent.LOAD, mapLoadComplete);
map.logoVisible = false;
}
}
... View more
08-02-2010
06:34 PM
|
0
|
0
|
1548
|
|
POST
|
Justin, Sure this is what works in the Flexviewer 2.0. Add this to the MapManager.mxml private function hideESRILogo(map:Map) : void {
for(var i:int=0; i<map.staticLayer.numChildren; i++){
if (map.staticLayer.getChildAt(i) is Image) {
(map.staticLayer.getChildAt(i) as Image).visible = false;
return;
}
}
} and then find the mapLoadComplete function and add this hideESRILogo(map);
... View more
08-02-2010
01:05 PM
|
0
|
0
|
1548
|
|
POST
|
Joshua, The link in the search results for Flexviewer 2.0 does not exist anymore (don't raelly know why they omitted it). And the shape_area and shape_Length has been a bug/feature since SFV 1.0. In the SearchWidget.mxml line 415 replace the existing line with this to fix it. if (fld.toUpperCase() != queryTitleField.toUpperCase() &&(fld.toUpperCase() != "SHAPE_LENGTH") && (fld.toUpperCase() != "SHAPE_AREA"))
... View more
08-02-2010
08:06 AM
|
0
|
0
|
589
|
|
POST
|
Simon, Make sure you have locale/{locale} added as a source path in your flexviewer project properties under the "Flex Build Path". Also ensure you have these "additional compiler arguments" added to the "Flex Compiler" page: -locale en_US -source-path=locale/{locale}
... View more
08-02-2010
05:45 AM
|
0
|
0
|
3045
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 17 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-08-2026
06:27 AM
|