POST
|
Mike, Is there any way to override this behaviour? I have overlay layers that a user might want to zoom into closer then the base map allows. Sierk
... View more
03-26-2012
05:23 AM
|
0
|
0
|
1441
|
POST
|
Hi, I am pretty new to ArcGIS Online and found that you can't seem to zoom in beyond a certain point, using an iPad, to something greater than 1:15,000 in ArcGIS Desktop terms. Is this some built in limitation or is it something I am missing. If it is the latter could you please provide instructions on how to remove this or a link to a document explaining the same. Thanks
... View more
03-23-2012
01:37 PM
|
0
|
10
|
11733
|
POST
|
Hi, I started out with an ArcGIS Flex API sample which I modified to show my own data in Flash Builder 4.6. Now I am trying to convert it to a mobile app. I am pretty new at this stuff and though I know that the event listeners for web apps are not the same as those for mobile apps I could not find anything that explained how this all went together. And to be honest I haven't gotten all the way through the Flash Builder in a week tutorial yet :D. Anyone care to take a look at the code and tell me how to handle the event to capture a screen point? Thanks, and here is the code:
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
xmlns:esri="http://www.esri.com/2008/ags"
initialize="application1_initializeHandler(event)"
pageTitle="Editor with all toolbar options"
>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<!--This sample shows you how to use the editor component with a full toolbar.-->
<fx:Style>
@namespace esri "http://www.esri.com/2008/ags";
esri|InfoWindow
{
background-color : #FFFFFF;
border-thickness : 2;
}
</fx:Style>
<fx:Script>
<![CDATA[
import com.esri.ags.components.supportClasses.CreateOptions;
import com.esri.ags.events.DrawEvent;
import com.esri.ags.tasks.GeometryService;
import com.esri.ags.tools.DrawTool;
//THIS IS THE DECLARATION THAT IS NOT BEING RECOGNIZED
import mx.events.FlexEvent;
//THIS IS THE FUNCTION THAT RELIES IN THE EVENT TO CAPTURE THE POINT
protected function application1_initializeHandler(event:FlexEvent):void
{
myEditor.featureLayers = [ points ];
}
]]>
</fx:Script>
<s:VGroup width="100%" height="100%">
<esri:Map id="myMap" wrapAround180="true">
<esri:extent>
<esri:Extent id="sheepfire"
xmin="2468000" ymin="371000" xmax="2475000" ymax="376000">
<esri:SpatialReference wkid="32054"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISDynamicMapServiceLayer
url="https://maps.ags.ruekert-mielke.com/AGS/rest/services/WaukeshaCity/WaukeshaSignsSampleApp2/MapServer"/>
<esri:FeatureLayer id="points"
mode="snapshot"
outFields="*"
url="https://maps.ags.ruekert-mielke.com/AGS/rest/services/WaukeshaCity/WaukeshaSignsSampleSigns/FeatureServer/0"/>
</esri:Map>
<esri:Editor id="myEditor"
width="100%"
geometryService="{new GeometryService('https://maps.ags.ruekert-mielke.com/AGS/rest/services/Geometry/GeometryServer')}"
map="{myMap}"
toolbarCutVisible="true"
toolbarMergeVisible="true"
toolbarReshapeVisible="true"
toolbarVisible="true"/>
<s:Label width="100%" text="This feature layer has {points.numGraphics} ({points.selectedFeatures.length} selected) fire areas."/>
</s:VGroup>
</s:View>
... View more
03-08-2012
04:46 PM
|
0
|
0
|
382
|
POST
|
Thanks Robert, That did the trick. Have a great day. Sierk
... View more
03-05-2012
05:11 AM
|
0
|
0
|
477
|
POST
|
Thanks Robert for watching this thread. here is all of the code:
<?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:esri="http://www.esri.com/2008/ags"
pageTitle="Attribute Inspector (edit)">
<fx:Script>
<![CDATA[
import com.esri.ags.Graphic;
import com.esri.ags.SpatialReference;
import com.esri.ags.events.FeatureLayerEvent;
import com.esri.ags.events.MapMouseEvent;
import com.esri.ags.geometry.Extent;
import com.esri.ags.geometry.Geometry;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.geometry.Polygon;
import com.esri.ags.symbols.SimpleFillSymbol;
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
//public var queryMapClick1:MapPoint;
protected function map_mapClickHandler(event:MapMouseEvent):void
{
// convert click to an extents
var vPt:MapPoint = event.mapPoint;
queryMapClick = event.mapPoint;
var vX:Number = vPt.x;
var vY:Number = vPt.y;
var vExtent:Extent = new Extent(vX - 100, vY - 100,vX + 100, vY + 100)
var thisSelectionQuery:Query = new Query();
thisSelectionQuery.geometry = vExtent;
myFeatureLayer.selectFeatures(thisSelectionQuery, FeatureLayer.SELECTION_NEW);
}
protected function attrInsp_faultHandler(event:FaultEvent):void
{
Alert.show(event.fault.message, "Fault");
}
protected function myFeatureLayer_selectionCompleteHandler(event:FeatureLayerEvent):void
{
// only show infoWindow if a feature was found
if (event.featureLayer.numGraphics > 0)
{
myMap.infoWindow.label = "Sign " + event.featureLayer.selectedFeatures[0].attributes.OBJECTID;
//I am not sure what I should do with this
myMap.infoWindow.show(queryMapClick.geometry as MapPoint);
}
else
{
Alert.show("Sorry found nothing here...");
}
}
]]>
</fx:Script>
<fx:Declarations>
<esri:Query id="queryMapClick"/>
</fx:Declarations>
<fx:Style>
@namespace s "library://ns.adobe.com/flex/spark";
@namespace esri "http://www.esri.com/2008/ags";
esri|InfoWindow
{
background-color: #BDB76B; /* dark khaki */
border-color: #000000;
border-thickness: 3;
lower-left-radius: 20;
lower-right-radius: 20;
upper-left-radius: 20;
upper-right-radius: 0;
padding-bottom: 7;
padding-left: 7;
padding-right: 7;
padding-top: 4;
}
esri|InfoWindowLabel
{
color: #FFFFFF;
font-size: 15;
padding-left: 120;
}
s|BorderContainer
{
background-color: #F0E68C; /* light khaki */
corner-radius: 15;
content-background-color: #BDB76B;
padding-bottom: 5;
}
</fx:Style>
<s:layout>
<s:VerticalLayout/>
</s:layout>
<esri:Map id="myMap"
load="attrInsp.featureLayers = [myFeatureLayer]"
mapClick="map_mapClickHandler(event)"
openHandCursorVisible="false">
<!-- Extent for Woukesha Signs -->
<esri:extent>
<esri:Extent xmin="2468000" ymin="371000" xmax="2475000" ymax="376000">
<esri:SpatialReference wkid="32054"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISDynamicMapServiceLayer
url="https://maps.ags.ruekert-mielke.com/AGS/rest/services/WaukeshaCity/WaukeshaSignsSampleSigns/MapServer"/>
<esri:ArcGISDynamicMapServiceLayer
url="https://maps.ags.ruekert-mielke.com/AGS/rest/services/WaukeshaCity/WaukeshaSignsSampleApp2/MapServer"/>
<esri:FeatureLayer id="myFeatureLayer"
mode="selection"
outFields="[HouseNumber,StreetName]"
selectionColor="0x000000"
selectionComplete="myFeatureLayer_selectionCompleteHandler(event)"
url="https://maps.ags.ruekert-mielke.com/AGS/rest/services/WaukeshaCity/WaukeshaSignsSampleSigns/MapServer/0"/>
<esri:GraphicsLayer id="myGraphicsLayer">
<esri:Graphic>
<esri:geometry>
<esri:MapPoint x="2471315" y="374682" spatialReference="{new SpatialReference(32054)}"/>
</esri:geometry>
</esri:Graphic>
</esri:GraphicsLayer>
<esri:infoWindowContent>
<s:BorderContainer>
<esri:AttributeInspector id="attrInsp"/>
</s:BorderContainer>
</esri:infoWindowContent>
</esri:Map>
<s:Label text="The feature layer has {myFeatureLayer.selectedFeatures.length} selected feature(s)."/>
</s:Application>
... View more
03-05-2012
04:43 AM
|
0
|
0
|
477
|
POST
|
Thanks rscheitlin for your reply. The variable is declared in the declaration section:
<fx:Declarations>
<esri:Query id="queryMapClick"/>
</fx:Declarations> and I get an error when I implement your suggestion: 1067: Implicit coercion of a value of type com.esri.ags.geometry:MapPoint to an unrelated type com.esri.ags.tasks.supportClasses:Query I tried finding an answer to this question but found none that explained it in such a way I could understand what is going on. I am kind of new at this. How would I resolve this? Thanks
... View more
03-05-2012
04:27 AM
|
0
|
0
|
477
|
POST
|
Hi, This is based on the "Attribute Inspector (View)" Sample. I have been at this for a while now, slowly constructing the application to selects a point feature rather than a polygon. But I am missing something. I got the "map_mapClickHandler" function to work. The "myFeatureLayer_selectionCompleteHandler" function returns the the selected feature's object ID but I get a "Error #1009: Cannot access a property or method of a null object reference." And I have no clue why. Thanks for your help. Here is the code: <fx:Script> <![CDATA[ import com.esri.ags.Graphic; import com.esri.ags.SpatialReference; import com.esri.ags.events.FeatureLayerEvent; import com.esri.ags.events.MapMouseEvent; import com.esri.ags.geometry.Extent; import com.esri.ags.geometry.Geometry; import com.esri.ags.geometry.MapPoint; import com.esri.ags.geometry.Polygon; import com.esri.ags.symbols.SimpleFillSymbol; import mx.controls.Alert; import mx.collections.ArrayCollection; import mx.rpc.events.FaultEvent; protected function map_mapClickHandler(event:MapMouseEvent):void { // convert click to an extents var vPt:MapPoint = event.mapPoint; var vX:Number = vPt.x; var vY:Number = vPt.y; var vExtent:Extent = new Extent(vX - 100, vY - 100,vX + 100, vY + 100) var thisSelectionQuery:Query = new Query(); thisSelectionQuery.geometry = vExtent; myFeatureLayer.selectFeatures(thisSelectionQuery, FeatureLayer.SELECTION_NEW); } protected function attrInsp_faultHandler(event:FaultEvent):void { Alert.show(event.fault.message, "Fault"); } protected function myFeatureLayer_selectionCompleteHandler(event:FeatureLayerEvent):void { // only show infoWindow if a feature was found if (event.featureLayer.numGraphics > 0) { myMap.infoWindow.label = "Sign " + event.featureLayer.selectedFeatures[0].attributes.OBJECTID; //I am not sure what I should do with this myMap.infoWindow.show(queryMapClick.geometry as MapPoint); } else { Alert.show("Sorry found nothing here..."); } } ]]> </fx:Script>
... View more
03-03-2012
09:28 PM
|
0
|
7
|
737
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|