|
POST
|
Sandeep, You need to attach the code for where you added that text in the InfoPopupWindow.mxml.
... View more
06-30-2010
09:56 AM
|
0
|
0
|
1185
|
|
POST
|
wee, Look at the example here http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AddLODS
... View more
06-30-2010
09:30 AM
|
0
|
0
|
946
|
|
POST
|
Darryl, Flex is case sensitive. Check to make sure you have all files and folders spelled exactly.
... View more
06-30-2010
09:25 AM
|
0
|
0
|
1836
|
|
POST
|
Natasha, The problem is that there are just to many possibilities to your issue and not enough details provided. When you make a change to any code in the SFV that is not added to Flex modules list for that project and not part of a widget, those changes are added to the compiled Index.swf. So there could be a thousand different things that could be causing your index.swf to not compile correctly.
... View more
06-30-2010
07:57 AM
|
0
|
0
|
1366
|
|
POST
|
David, Yahoo's site has several examples. There has only been one or two threads on this in the last year or more and none of them deal exactly with what you are doing.
... View more
06-30-2010
05:15 AM
|
0
|
0
|
1836
|
|
POST
|
Daniel, This is how you do it. In the PrintWidget.mxml add this import and change the line bellow that I have commented out to the new line below it.
import com.esri.solutions.flexviewer.SiteContainer;
var bmpMap:BitmapData = ImageSnapshot.captureBitmapData(SiteContainer.getInstance());
//var bmpMap:BitmapData = ImageSnapshot.captureBitmapData(map);
... View more
06-29-2010
02:48 PM
|
0
|
0
|
1570
|
|
POST
|
Dasa, Here is my test case. I believe you will find it has something to do with the NavTool.deactivate which is what I think Tony is seeing also. <?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
pageTitle="Basic usage of DrawTool">
<s:layout>
<s:VerticalLayout paddingBottom="5"/>
</s:layout>
<fx:Style>
@namespace mx "library://ns.adobe.com/flex/mx";
mx|ToolTip
{
font-size: 14;
}
</fx:Style>
<fx:Script>
<![CDATA[
import com.esri.ags.events.DrawEvent;
import com.esri.ags.geometry.MapPoint;
import mx.controls.Alert;
import com.esri.ags.Graphic;
import spark.events.IndexChangeEvent;
import com.esri.ags.events.GraphicEvent;
private var menuItem:ContextMenuItem = new ContextMenuItem("Remove Me");
private function init(evt:Event):void
{
myGraphicsLayer.addEventListener(GraphicEvent.GRAPHIC_ADD,addContextMenu);
menuItem.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, removeMeMenuItemHandler);
navTool.activate(NavigationTool.PAN);
}
private function removeMeMenuItemHandler(event:ContextMenuEvent):void
{
var graphic:Graphic = event.contextMenuOwner as Graphic;
graphic.dispatchEvent(new Event("removeMe", true));
}
private function addContextMenu(evt:Event):void
{
var gLyr:GraphicsLayer = evt.target as GraphicsLayer;
myGraphicsLayer.addEventListener("removeMe", graphicRemoveMeHandler);
for each (var g:Graphic in gLyr.graphicProvider)
{
if (g.contextMenu == null)
{
var contextMenu:ContextMenu = new ContextMenu();
contextMenu.hideBuiltInItems();
contextMenu.customItems.push(menuItem);
if (g.geometry.type.toUpperCase() == "ESRIGEOMETRYPOINT")
{
var mp:MapPoint = g.geometry as MapPoint;
var menuItem2:ContextMenuItem = new ContextMenuItem("X: " + numFormatter2.format(mp.x) + ", Y: " + numFormatter2.format(mp.y));
contextMenu.customItems.push(menuItem2);
}
g.contextMenu = contextMenu;
}
}
}
private function graphicRemoveMeHandler(event:Event):void
{
var gLyr:GraphicsLayer = event.currentTarget as GraphicsLayer;
var graphic:Graphic = event.target as Graphic;
var gObj:Object = myGraphicsLayer.graphicProvider;
for (var i:int = myGraphicsLayer.numGraphics - 1; i >= 0; i--)
{
if(myGraphicsLayer.graphicProvider.name == graphic.name)
myGraphicsLayer.remove(myGraphicsLayer.graphicProvider);
}
}
protected function bb_changeHandler(event:IndexChangeEvent):void
{
if (event.newIndex == -1)
{
drawTool.deactivate();
navTool.activate(NavigationTool.PAN);
navTool.deactivate();
}
else
{
switch (bb.dataProvider.getItemAt(event.newIndex))
{
case "Point":
navTool.deactivate();
drawTool.activate(DrawTool.MAPPOINT);
break;
case "Multipoint":
navTool.deactivate();
drawTool.activate(DrawTool.MULTIPOINT);
break;
case "Single Line":
navTool.deactivate();
drawTool.activate(DrawTool.LINE);
break;
case "Polyline":
navTool.deactivate();
drawTool.activate(DrawTool.POLYLINE);
break;
case "FreeHand Polyline":
navTool.deactivate();
drawTool.activate(DrawTool.FREEHAND_POLYLINE);
break;
case "Polygon":
navTool.deactivate();
drawTool.activate(DrawTool.POLYGON);
break;
case "Freehand Polygon":
navTool.deactivate();
drawTool.activate(DrawTool.FREEHAND_POLYGON);
break;
case "Rectangle":
navTool.deactivate();
drawTool.activate(DrawTool.EXTENT);
break;
}
}
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Symbol for all point shapes -->
<esri:SimpleMarkerSymbol id="sms"
color="0x00FF00"
size="12"
style="square"/>
<!-- Symbol for all line shapes -->
<esri:SimpleLineSymbol id="sls"
color="0x00FF00"
width="3"/>
<!-- Symbol for all polygon shapes -->
<esri:SimpleFillSymbol id="sfs"
color="0xFFFFFF"
style="diagonalcross">
<esri:outline>
<esri:SimpleLineSymbol color="0x00FF00" width="2"/>
</esri:outline>
</esri:SimpleFillSymbol>
<esri:DrawTool id="drawTool"
fillSymbol="{sfs}"
graphicsLayer="{myGraphicsLayer}"
lineSymbol="{sls}"
map="{myMap}"
markerSymbol="{sms}"/>
<mx:NumberFormatter id="numFormatter"
useThousandsSeparator="true"
precision="2"/>
<mx:NumberFormatter id="numFormatter2"
useThousandsSeparator="false"
precision="2"/>
<esri:NavigationTool id="navTool" map="{myMap}" />
</fx:Declarations>
<s:controlBarLayout>
<s:HorizontalLayout horizontalAlign="center"
paddingBottom="7"
paddingTop="7"/>
</s:controlBarLayout>
<s:controlBarContent>
<s:ButtonBar id="bb" change="bb_changeHandler(event)">
<s:ArrayList>
<fx:String>Point</fx:String>
<fx:String>Multipoint</fx:String>
<fx:String>Single Line</fx:String>
<fx:String>Polyline</fx:String>
<fx:String>FreeHand Polyline</fx:String>
<fx:String>Polygon</fx:String>
<fx:String>Freehand Polygon</fx:String>
<fx:String>Rectangle</fx:String>
</s:ArrayList>
</s:ButtonBar>
</s:controlBarContent>
<esri:Map id="myMap" level="3" useHandCursor="true">
<esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
<esri:GraphicsLayer id="myGraphicsLayer" creationComplete="init(event)"/>
</esri:Map>
<s:Label text="The DrawTool can be used to draw new features which can then either be used as input for another task or saved as new features in a feature service (using the FeatureLayer.applyEdits)" width="100%"/>
</s:Application>
... View more
06-29-2010
11:59 AM
|
0
|
0
|
2060
|
|
POST
|
Tony, Yep, almost all my tools have custom cursors.
... View more
06-29-2010
11:41 AM
|
0
|
0
|
2060
|
|
POST
|
Tony, OK glad to see that I am not the only one noticing that issue. It is not limited to the pan mode though. No matter what tool or cursor is set when you right click and hover over a context menu the mouse cursor is completely gone until you dismiss that context menu.
... View more
06-29-2010
11:30 AM
|
0
|
0
|
2060
|
|
POST
|
Bobby, This RRS Feed does not contain any geo location information that the RRS to GeoRSS can use to determine a location for the events. The RSS to GeoRSS looks in the feed and searches for locations like Miami Florida and then adds the lat and long for Miami to the feed record. Since there is no geo locations in this feed this is not something you can use.
... View more
06-29-2010
05:42 AM
|
0
|
0
|
492
|
|
POST
|
David, The rest service directory that the LayerDetails is getting the extent info from does not know about any layer definitions that you have applied (as those are client side). To do what you are trying to do you need to query the map service using your same layer definition query and then get the graphics extent, like this var graphicsExtent:Extent = GraphicUtil.getGraphicsExtent(featureSet.features);
if (graphicsExtent)
{
map.extent = graphicsExtent;
}
... View more
06-29-2010
05:08 AM
|
0
|
0
|
1836
|
|
POST
|
Divya, A link location of "bin-debug\index.html" is not going to work, you should not be linking to anything from the bin-debug folder as that is just for debuging. When you export a release build then the contents of the bin-release folder should be copied to a virtual directory (if IIS) or httpDocs (if Apache) and then you should be using a fully qualified URL in your link. Your link should look something like this "http://yourserver/yourvirtualdirectory/index.html.
... View more
06-29-2010
04:59 AM
|
0
|
0
|
1461
|
|
POST
|
Eric, If you are talking about the 1.3 API then look here http://resources.esri.com/help/9.3/arcgisserver/apis/flex/help/index.html#inside_api/styling_components.htm# else if 2.0 Beta API look here http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FeatureLayer_InfoWindow
... View more
06-28-2010
02:17 PM
|
0
|
0
|
425
|
|
POST
|
Carmen, This is a mini navigation bar for a non SFV app. You could take the code and put it in your banner component or just use it as is. http://forums.esri.com/Thread.asp?c=158&f=2421&t=294409&mc=23#918407
... View more
06-28-2010
11:05 AM
|
0
|
0
|
727
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 16 | 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 |
4 weeks ago
|