|
POST
|
Phillip, Make sure that when you added this widget to your config.xml you DID NOT specify a config="x" attribute as this is just a simple widget and does not have a configuration xml file. <widget label="Parcel Search" preload="open" x="50" y="100"
icon="assets/images/i_search_parcel.png"
config="widgets/Parcel/SearchWidget.xml"
url="widgets/Parcel/SearchWidget.swf"/>
... View more
09-20-2010
05:49 AM
|
0
|
0
|
769
|
|
POST
|
Mat51, There are several samples out there if you search for them... http://forums.esri.com/Thread.asp?c=158&f=2421&t=286636&mc=79#msgid892747
... View more
09-18-2010
05:30 AM
|
0
|
0
|
397
|
|
POST
|
Melissa, You do not have anything configured incorrectly... That is just the way that the TOC control has worked every since Tom Hill created back in 2008. The TOC component is a difficult animal to understand (as far as it's code) so you are just stuck with the way it works. Talking to the API Team they have no plans to update this code or change it's functionality.
... View more
09-17-2010
11:18 AM
|
0
|
0
|
2334
|
|
POST
|
Shaning, Sometimes that just happens and you have to manually copy the files from your src folder into your bin-debug.
... View more
09-17-2010
08:53 AM
|
0
|
0
|
1023
|
|
POST
|
From the sounds of it, there will be a pretty nice one in FlexViewer 2.1. Just a few more days to wait.
... View more
09-17-2010
08:42 AM
|
0
|
0
|
1811
|
|
POST
|
Deona, If both map services are ArcGISDynamicMapServiceLayer than yes ArcGIS Server will attempt to re-project the other service to the WKID of the service that is added to the map first just like ArcMap. This does not hold true if you are working with ArcGISTiledMapServiceLayer like most basemaps from esri are added to the map as.
... View more
09-16-2010
07:21 AM
|
0
|
0
|
438
|
|
POST
|
Stacey, Here is the fix. This code needs to replace your ControllerMenu.mxml <?xml version="1.0" encoding="utf-8"?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2010 ESRI
//
// All rights reserved under the copyright laws of the United States.
// You may freely redistribute and use this software, with or
// without modification, provided you include the original copyright
// and use restrictions. See use restrictions in the file:
// <install location>/License.txt
//
////////////////////////////////////////////////////////////////////////////////
-->
<mx:Canvas xmlns:mx ="http://www.adobe.com/2006/mxml"
xmlns:flash ="flash.filters.*"
xmlns:classic ="widgets.ClassicController.*"
rollOver ="openMenu()"
rollOut ="closeMenu()" xmlns:s="library://ns.adobe.com/flex/spark">
<!--
/**
* The ControllerMenu represents the drop down menu on the controler bar.
* Each ControllerMenu will have menu items of ControllerMenuItem on it.
*/
-->
<mx:Script>
<![CDATA[
import com.esri.viewer.AppEvent;
import com.esri.viewer.ViewerContainer;
import mx.collections.ArrayCollection;
import spark.components.supportClasses.ItemRenderer;
/**
* menuImage is the url to the image used for the menu.
*/
[Bindable]
public var menuImage:String;
/**
* menuLabel is the label displayed for the menu.
*/
[Bindable]
public var menuLabel:String;
/**
* menuCollection is the array collection of controller menu items to be listed in the menu.
*/
[Bindable]
public var controllerMenuItemAC:ArrayCollection;
private var menuTimer:uint;
private static var STATE_MAXIMIZED:String = "maximized";
//open menu
private function openMenu():void
{
menuTimer = setTimeout(showMenu, 200);
}
//close menu
private function closeMenu():void
{
clearTimeout(menuTimer);
currentState = "";
}
//show menu
private function showMenu():void
{
currentState = ControllerMenu.STATE_MAXIMIZED;
}
protected function controllerMenuItemDG_controllerMenuItemClickHandler(event:Event):void
{
var controllerMenuItem:ControllerMenuItem = ItemRenderer(event.target).data as ControllerMenuItem
switch (controllerMenuItem.itemAction)
{
case "widget":
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.WIDGET_RUN, controllerMenuItem.itemId));
break;
case "navtool":
var data:Object =
{
tool: controllerMenuItem.itemValue,
status: controllerMenuItem.itemLabel
}
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.SET_MAP_NAVIGATION, data));
break;
case "basemap":
ViewerContainer.dispatchEvent(new AppEvent(AppEvent.BASEMAP_SWITCH, controllerMenuItem.itemValue));
break;
case "link":
navigateToURL(new URLRequest(controllerMenuItem.itemValue));
break;
case "function":
break;
}
}
]]>
</mx:Script>
<mx:states>
<mx:State name="maximized">
<mx:SetProperty target="{menuBox}" name="height"/>
<mx:SetProperty target="{menuBox}" name="width"/>
</mx:State>
</mx:states>
<mx:transitions>
<mx:Transition fromState="" toState="*">
<mx:Resize duration="400" target="{menuBox}" />
</mx:Transition>
<mx:Transition fromState="*" toState="">
<mx:Resize duration="200" target="{menuBox}" />
</mx:Transition>
</mx:transitions>
<mx:VBox id="mainBox"
horizontalAlign="center"
horizontalScrollPolicy="off"
verticalGap="0"
verticalScrollPolicy="off" >
<mx:Image id="menuIcon"
buttonMode="true"
source="{menuImage}"
useHandCursor="true">
<mx:filters>
<flash:GlowFilter color="#000000" alpha="0.5" blurX="10" blurY="10"/>
</mx:filters>
</mx:Image>
<mx:VBox id="menuBox"
height="0"
horizontalAlign="center"
horizontalScrollPolicy="off"
verticalGap="0"
verticalScrollPolicy="off"
width="100">
<mx:VBox backgroundColor="#FFFFFF"
backgroundAlpha="0.0"
horizontalAlign="center"
rollOver="currentState='maximized'"
verticalGap="0"
minWidth="150">
<!-- TODO: set menuLabel variable
<mx:Label styleName="ControllerTitle" text="{menuLabel}" color="#FF0000" fontSize="20">
<mx:filters>
<flash:GlowFilter color="#000000" alpha="0.8" blurX="10" blurY="10"/>
</mx:filters>
</mx:Label> -->
<mx:VRule styleName="ControllerRule" height="15"/>
</mx:VBox>
<mx:Canvas styleName="ControllerCanvas" minWidth="140">
<mx:VBox width="100%" verticalGap="0" click="{currentState=''}">
<classic:ControllerMenuItemDataGroup id="controllerMenuItemDG"
dataProvider="{controllerMenuItemAC}"
controllerMenuItemClick="controllerMenuItemDG_controllerMenuItemClickHandler(event)">
<classic:layout>
<s:VerticalLayout
gap="0"
useVirtualLayout="true"
verticalAlign="middle"/>
</classic:layout>
</classic:ControllerMenuItemDataGroup>
</mx:VBox>
</mx:Canvas>
</mx:VBox>
</mx:VBox>
<mx:Canvas width="{mainBox.width}" height="{mainBox.height}" />
</mx:Canvas>
... View more
09-16-2010
07:17 AM
|
0
|
0
|
702
|
|
POST
|
Ramakrishna, Than how do you plan to deploy this app externally?...
... View more
09-16-2010
06:05 AM
|
0
|
0
|
449
|
|
POST
|
Ramakrishna, The fact that I can not even open http://pfoc2.uanet.edu/ tells me you have a big issue.
... View more
09-16-2010
04:56 AM
|
0
|
0
|
2046
|
|
POST
|
Mattias, If you look at the MyNavigation.as it starts out with package com.esri.ags.samples, this is where you need to put it. You will have to create a ags and a samples sub folder in the com esri folder structure. Then in MapManager
//Add this import
import com.esri.ags.samples.MyNavigation;
//in the config function add
map.navigationClass = MyNavigation;
Then add this to the com.esri.ags.samples folder The MyNavigationSlider.as File // ActionScript file
package com.esri.ags.samples
{
import com.esri.ags.controls.navigationClasses.NavigationSlider;
import com.esri.ags.layers.LOD;
import mx.controls.sliderClasses.SliderDirection;
public class MyNavigationSlider extends NavigationSlider
{
override protected function formatDataTip(value:Number):String
{
var result:String;
var lod:LOD = map.lods[value]; // get the LOD for the given level
var scale:Number = lod.scale;
if (scale < 10000)
{
result = "Neighborhood";
}
else if (scale < 100000)
{
result = "City"
}
else if (scale < 1400000)
{
result = "County"
}
else if (scale < 5000000)
{
result = "State/Province"
}
else if (scale < 20000000)
{
result = "Country"
}
else if (scale < 50000000)
{
result = "Region"
}
else if (scale < 100000000)
{
result = "Continent"
}
else
{
result = "World"
}
return result;
}
}
}
... View more
09-16-2010
04:54 AM
|
0
|
0
|
1091
|
|
POST
|
Joshua, Did you follow Dasa's advice and change the gotoMyurl function?
private function gotoMyURL(evt:Event):void
{
var myURL:URLRequest = new URLRequest("http://www.yahoo.com");
navigateToURL(myURL);
evt.stopImmediatePropagation();
}
... View more
09-16-2010
04:32 AM
|
0
|
0
|
1715
|
|
POST
|
Mattias, Here is some code I used to change the fader in the index from the MapManager. This will not be just copy and paste code for you but you cam see how it is done from this.
//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;
}
}
}
}
}
... View more
09-16-2010
04:25 AM
|
0
|
0
|
989
|
|
POST
|
Matt, What is the URL? It could be a firewall issue.
... View more
09-15-2010
09:42 AM
|
0
|
0
|
2046
|
|
POST
|
Guys, Are you using the fully qualified name of the external server in your config.xml. What I mean is internally urls like http://gisserv2/arcgis/rest/services/ParcelOrthos/MapServer would work but now it would have to be http://gis.calhouncounty.org/arcgis/rest/services/ParcelOrthos/MapServer This is also assuming that the server that you have moved out side the firewall is also the ArcGIS Server.
... View more
09-15-2010
09:03 AM
|
0
|
0
|
2046
|
| 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
|