POST
|
The mobile map cache tool is for operational layers. For Basemaps you would need to look at 'Creating a tile package or tiled dataset' http://resources.arcgis.com/en/help/windows-mobile/app/index.html#//007v00000038000000
... View more
05-08-2013
02:32 PM
|
0
|
0
|
373
|
POST
|
Yeh, anything outside the gis server is out of my league. I have the IT dudes looking into DNS with the reverse proxy. In the mean time I have found a way to get me going. The ArcGIS Server rest.config file stores the soap end point urls and you can change them. I Set the SoapUrl to point to point to my https reverse proxy server. Now edits will synchronise over an external internet connection. BUT they will not work in our intranet. This means I have to set up the Mobile projects in Mobile Project Center in an external environment, and not from my networked intranet machine., because I cann not connect to the reverse proxy from intranet. This is not ideal but at least I can move forward. Hopefully our IT dudes will find a better solution. <SoapUrl>https://server/ArcGIS/services</SoapUrl> <SoapSslUrl>https://server:443/ArcGIS/services</SoapSslUrl> http://help.arcgis.com/en/arcgisserv...0001657000000/
... View more
04-16-2013
05:57 PM
|
0
|
0
|
1337
|
POST
|
Here is what I have found while trying to debug my own issues and it might help. (although my issues relate to dns type, name resolution, connection errors) The rest.config file stores the soap end point urls and you can change them. Try setting the SoapUrl to point to your https reverse proxy server. <SoapUrl>https://server/ArcGIS/services</SoapUrl> <SoapSslUrl>https://server:443/ArcGIS/services</SoapSslUrl> http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Exposing_your_services_to_external_users/009300001657000000/
... View more
04-16-2013
05:42 PM
|
0
|
0
|
206
|
POST
|
We have had public facing ArcGIS Server flex api sites up and running for a few years. I can see the mobile and rest end points. https://mapping.ssc.nsw.gov.au/ArcGIS/rest/services https://mapping.ssc.nsw.gov.au/ArcGIS/Mobile/Content/WindowsMobile/Projects Server is set up on Windows server 2008, with IIS I only have the issue when using the 'synchronise' button. I am thinking it is a setting somewhere, just do not know where.
... View more
04-15-2013
12:17 PM
|
0
|
0
|
1337
|
POST
|
I have a basic ArcGIS for Mobile project with a point edit layer. Synchronising works fine inside the intranet, but errors when synchronising from an external internet connection. I can access base maps from external internet connection without any issue. Internet access to arcgis server is via a reverse proxy server. Synchronizing Error Message (with upload or download): Name resolution failure. The name resolver service could not resolve the host name. Anyone had this before? I have also tried to create the project using Mobile Project Centre on an external device. I can add Base maps using the external URL But Operational layers get a red Exclamation mark and the error message " The remote name could not be resolved: 'internalServerName' " (see image)
... View more
04-14-2013
09:47 PM
|
0
|
9
|
6284
|
POST
|
I added in creationComplete of the application, but it could be with the map's creationComplete. Here is the full test app. (this was is with 2.5 arc gis flex api. The textSymbol for latest api is slightly different with an alpha parameter. I added a commented textSymbol which should work with newer api, but untested by me.). <?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" minWidth="955" minHeight="600" xmlns:esri="http://www.esri.com/2008/ags" creationComplete="application1_creationCompleteHandler(event)"> <fx:Script> <![CDATA[ import com.esri.ags.Graphic; import com.esri.ags.events.MapMouseEvent; import com.esri.ags.geometry.MapPoint; import com.esri.ags.symbols.TextSymbol; import mx.events.FlexEvent; //[Bindable] private var graphicContextMenu:ContextMenu = new ContextMenu(); protected function application1_creationCompleteHandler(event:FlexEvent):void { graphicContextMenu.hideBuiltInItems(); var item:ContextMenuItem; item = new ContextMenuItem("Delete me"); //item.enabled = true; item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, deleteGraphic_handler); graphicContextMenu.customItems.push(item); } protected function deleteGraphic_handler(event:ContextMenuEvent):void { trace("deleteGraphic_handler"); if (event.contextMenuOwner is Graphic) { var graphic:Graphic = event.contextMenuOwner as Graphic; graphic.graphicsLayer.remove(graphic); } } protected function map_mapClickHandler(event:MapMouseEvent):void { const mapPoint:MapPoint = event.mapPoint; var textSymbol:TextSymbol = new TextSymbol("myTextSymbol",null,0x000000, true,0,true); //2.5 api //var textSymbol:TextSymbol = new TextSymbol("myTextSymbol",null,0x000000, 1, true,0,true); // newer api var myGraphicMarker:Graphic = new Graphic(mapPoint, textSymbol); myGraphicMarker.contextMenu = graphicContextMenu; graphicsLayer.add(myGraphicMarker); graphicsLayer.refresh(); } ]]> </fx:Script> <fx:Declarations> <!-- Place non-visual elements (e.g., services, value objects) here --> </fx:Declarations> <esri:Map id="map" mapClick="map_mapClickHandler(event)" > <esri:extent> <esri:Extent xmin="-10753431" ymin="4624151" xmax="-10737799" ymax="4635884"> <esri:SpatialReference wkid="102100"/> </esri:Extent> </esri:extent> <esri:ArcGISTiledMapServiceLayer id="baseLayer" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/> <esri:GraphicsLayer id="graphicsLayer"/> </esri:Map> </s:Application>
... View more
02-13-2013
06:47 PM
|
0
|
0
|
935
|
POST
|
You could add a context menu to the graphic. ie right click on the graphic and choose "delete"
private var graphicContextMenu:ContextMenu = new ContextMenu();
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
graphicContextMenu.hideBuiltInItems();
var item:ContextMenuItem;
item = new ContextMenuItem("Delete me");
item.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, deleteGraphic_handler);
graphicContextMenu.customItems.push(item);
}
protected function deleteGraphic_handler(event:ContextMenuEvent):void
{
trace("deleteGraphic_handler");
if (event.contextMenuOwner is Graphic)
{
var graphic:Graphic = event.contextMenuOwner as Graphic;
graphic.graphicsLayer.remove(graphic);
}
}
protected function map_mapClickHandler(event:MapMouseEvent):void
{
const mapPoint:MapPoint = event.mapPoint;
var textSymbol:TextSymbol = new TextSymbol("myTextSymbol",null,0x000000, true,0,true);
var myGraphicMarker:Graphic = new Graphic(mapPoint, textSymbol);
myGraphicMarker.contextMenu = graphicContextMenu;
graphicsLayer.add(myGraphicMarker);
graphicsLayer.refresh();
}
... View more
02-13-2013
05:43 PM
|
0
|
0
|
685
|
POST
|
Hi Royce, This is what I have been using for the last few years. I built some functions to copy the map into a bitmap object and crop it to suit whatever size is needed. It doesnt matter the size of the browser window it uses the ratio of the desired print size to crop the map. The Bitmap can the be used in AlivePDF. (no cloning of maps needed). As you say it is what it is and sometimes using the latest and greatest is not an option. I have not tested in AGS Flex API 3.1 because our organisation is still on 10.x of flash, and 10.0 of ArcGIS. Sounds like the new 10.1 print options would be great, but no good to me at the moment. Basic rundown When generating pdf use the PrintMapUtil.trimmedMap function.
protected function button1_clickHandler(event:MouseEvent):void
{
var pdf:PDF = new PDF(Orientation.LANDSCAPE,Unit.INCHES,Size.LETTER);
pdf.setDisplayMode (Display.FULL_PAGE);
pdf.setMargins(0.5,0.5,0.5,0.5);
pdf.addPage();
pdf.setAutoPageBreak(false,0.5);
//Use the PDF page margins for the width and height of printable map area.
//The content width and height are the desired map size on the page. This example is
//just fitting the map to the margins.
var marginsRectangle:Rectangle = pdf.getMargins();
var contentWidth:Number = marginsRectangle.width;
var contentHeigth:Number = marginsRectangle.height ;
var newBitmap:Bitmap = PrintMapUtil.trimmedMap(map, contentWidth, contentHeigth);
// Add the map image
pdf.addImage(newBitmap, null ,0, 0,
contentWidth , contentHeigth , 0, 1, true, ImageFormat.JPG, 75);
pdf.save(Method.REMOTE,
"http://alivepdf.bytearray.org/wp-content/demos/create.php",
Download.ATTACHMENT, "report.pdf");
}
public static function trimmedMap(map:Map, printAreaWidth:Number, printAreaHeight:Number):Bitmap
{
var rectangle:Rectangle = clipRectangle(map, printAreaWidth, printAreaHeight);
//get the map as bitmapdata so the part we want can be copied and clipped.
var myBitmapData:BitmapData = new BitmapData(map.width,map.height);
myBitmapData.draw(map,null,null,null,rectangle,true);
// create a new cropped map image to fit the print area.
var newBitmapData:BitmapData = new BitmapData(rectangle.width, rectangle.height)
newBitmapData.copyPixels(myBitmapData, rectangle, new Point(0, 0));
return new Bitmap(newBitmapData);
}
See attached for a sample project and the full PrintMapUtil with the clipRectangle function. (fxp file is inside the zip)
... View more
01-02-2013
01:29 PM
|
0
|
0
|
477
|
POST
|
If your objective is to export to a new shape file, you could use FeatureClassToFeatureClass. FeatureClassToFeatureClass allows for Field Mappings, so you can specify which fields to keep.
inputShapeFile = "C:/Temp/yourInput.shp"
outputLocation = "C:/Temp"
outputShapeFileName = "yourExport.shp"
# List of the fields to keep.
outputFields = ["UGISID", "LBL_X", "LBL_Y"]
fieldMappings = arcpy.FieldMappings()
# create the field mappings from the outputFields list.
# only fields in the list will be included in the exported shape file.
for field in outputFields:
fieldMap = arcpy.FieldMap()
fieldMap.addInputField(inputShapeFile, field)
fieldMappings.addFieldMap(fieldMap)
# Use FeatureClassToFeatureClass and apply the fieldMappings
arcpy.FeatureClassToFeatureClass_conversion(inputShapeFile,
outputLocation,
outputShapeFileName,
"",
fieldMappings,
"")
... View more
09-16-2012
03:20 PM
|
0
|
6
|
2773
|
POST
|
Hi I have ported my ArcGIS Flex API web site 'Sutherland Shire Maps': https://mapping.ssc.nsw.gov.au/Sutherland/ into an ipad app using flex builder. It is in the appstore freely available. It is not a trivial task! Firstly, you NEED a mac to load to the App Store. If you do not want to load to the appstore, you will have to register all devices with the apple dev site which will create the provisioning files etc. that you need. You can then use itunes on pc to load the app to each of the registered devices. Creating the licencing and provisioning files can be quite confusing when starting out. Especially if you are using windows to do it. The emulator is built in to FlashBuilder. When you create a mobile flex app, you can choose run configurations and select the device to emulate , and it will run on your pc when you click the run button in the Fash Builder IDE. There are many controls in Flex spark which are not compatible or recommended for mobile apps. Optimising controls for mobile is where I spent a lot of time when porting my web app to a mobile app. It took about 2 weeks to port across. A lot of the documentaion about flex to ios make it look seemless and easy, but dont be fooled. I found myself scratching my head a few times along the way. The end result runs and looks great on the ipad, so it is worth the effort.
... View more
09-09-2012
03:06 PM
|
0
|
0
|
135
|
POST
|
Hi Koman, If you look at the adobe help for 4.6 radiobutton, the sample shows it uses the 'group' property instead of the 'groupName' http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7d8b.html#WS2db454920e96a9e51e63e3d11c0bf69084-7d8a Yours should be <s:RadioButton label="Button 1" group="{radioBtnGroup}"/> Anyhow here is the original code ported to spark
<?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" minWidth="955" minHeight="600" xmlns:esri="http://www.esri.com/2008/ags">
<s:layout>
<s:VerticalLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import com.esri.ags.events.LayerEvent;
import mx.collections.ArrayCollection;
import mx.events.ItemClickEvent;
import spark.components.RadioButton;
protected function loadLayerName(event:LayerEvent):void
{
layerPanel.removeAllElements()
//loop through each layer and add as a radiobutton
for(var i:uint = 0; i < (dynamicLayer.layerInfos.length); i++)
{
var radioBtn:RadioButton = new RadioButton;
radioBtn.group = radioBtnGroup;
radioBtn.value = i;
radioBtn.label = dynamicLayer.layerInfos.name;
layerPanel.addElement(radioBtn);
}
//set the visible layer the first radio button
radioBtnGroup.selectedValue = 0;
dynamicLayer.visibleLayers = new ArrayCollection([0]);
}
protected function radioClickHandler(event:ItemClickEvent):void
{
// update the visible layers to only show the layer selected
dynamicLayer.visibleLayers = new ArrayCollection([event.index]);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
<s:RadioButtonGroup id="radioBtnGroup" itemClick="radioClickHandler(event)"/>
</fx:Declarations>
<esri:Map id="myMap">
<esri:extent>
<esri:Extent xmin="-126" ymin="27" xmax="-72" ymax="50">
<esri:SpatialReference wkid="4326"/>
</esri:Extent>
</esri:extent>
<esri:ArcGISDynamicMapServiceLayer id="dynamicLayer"
load="loadLayerName(event)"
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/{myURL.selectedItem}/MapServer" />
</esri:Map>
<s:ComboBox id="myURL" selectedIndex="0" horizontalCenter="0" width="300">
<s:dataProvider>
<s:ArrayList>
<fx:String>Specialty/ESRI_StateCityHighway_USA</fx:String>
<fx:String>Specialty/ESRI_StatesCitiesRivers_USA</fx:String>
<fx:String>Demographics/ESRI_Census_USA</fx:String>
</s:ArrayList>
</s:dataProvider>
</s:ComboBox>
<s:Panel id="layerPanel" width="300" height="250" x="20" y="250">
<s:layout>
<s:VerticalLayout paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10"/>
</s:layout>
</s:Panel>
</s:Application>
... View more
08-22-2012
06:12 PM
|
0
|
0
|
708
|
POST
|
Hi Koman, You now need to set the panel's layout inside the panel. (In the VerticalLayout tag you can set any padding ang gap etc.)
<s:Panel>
<s:layout>
<s:VerticalLayout paddingTop="10" gap="2"/>
</s:layout>
</s:Panel>
... View more
08-21-2012
03:57 PM
|
0
|
0
|
708
|
POST
|
Hi, You will need to add an event listener when the ckeckbox is created. In the handler you would then have to add or remove the layer from the visiblelayers arraycollection.
//add event listener
var chks:CheckBox = new CheckBox;
chks.addEventListener(Event.CHANGE, chk_changeHandler);
protected function chk_changeHandler(event:Event):void
{
var checkBox:CheckBox = event.currentTarget as CheckBox;
if (checkBox.selected = true)
{
trace("check is selected");
//add to visiblelayers
}
else
{
// remove from visiblelayers
}
}
... View more
08-19-2012
04:21 PM
|
0
|
0
|
708
|
POST
|
You can still instantiate the Bindable query task outside of the function. You just set its paramaters when the button is clicked (or when you need to execute the querytask.) This code is an adaptation of the ESRI sample at: http://help.arcgis.com/en/webapi/flex/samples/index.html#/Query_result_in_table/01nq0000005t000000/ I have just commented out the MXML query and query task, and created and used them in actionscript. <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:esri="http://www.esri.com/2008/ags" xmlns:s="library://ns.adobe.com/flex/spark" pageTitle="Query Task (without a map)"> <!-- This sample shows how to query the server and displaying the result in a datagrid. The query is sent using the execute() method on a QueryTask. This sample sets up a QueryTask (what layer on what server to query). When the user clicks the "Get Details" button, a Query is sent with the user-provided text to search for. Meanwhile a DataGrid has been created which listens for the results (using executeLastResult) from the querytask. --> <s:layout> <s:VerticalLayout horizontalAlign="center" paddingTop="25"/> </s:layout> <fx:Script> <![CDATA[ import com.esri.ags.tasks.QueryTask; import com.esri.ags.tasks.supportClasses.Query; [Bindable] public var queryTask:QueryTask; protected function button1_clickHandler(event:MouseEvent):void { // Set up the query var query:Query = new Query; query.outFields = ["STATE_NAME","STATE_FIPS","SUB_REGION","STATE_ABBR","POP2000","POP2007"] query.returnGeometry = false; query.text = stateName.text; //Use the bindable querytask queryTask = new QueryTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5") queryTask.useAMF = false; queryTask.execute(query); } ]]> </fx:Script> <fx:Declarations> <!--<esri:QueryTask id="queryTask" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5" useAMF="false"/> <esri:Query id="query" outFields="[STATE_NAME,STATE_FIPS,SUB_REGION,STATE_ABBR,POP2000,POP2007]" returnGeometry="false" text="{stateName.text}"/>--> </fx:Declarations> <s:Panel title="Using Query tasks without maps"> <s:layout> <s:VerticalLayout/> </s:layout> <s:HGroup verticalAlign="middle"> <s:Label text="US state name: "/> <s:TextInput id="stateName" text="Carolina"/> <s:Button click="button1_clickHandler(event)" label="Get Details"/> </s:HGroup> <mx:DataGrid id="resultsGrid" dataProvider="{queryTask.executeLastResult.attributes}" visible="{queryTask.executeLastResult != null}"> <mx:columns> <mx:DataGridColumn dataField="STATE_NAME" headerText="State Name"/> <mx:DataGridColumn dataField="SUB_REGION" headerText="Region"/> <mx:DataGridColumn dataField="STATE_FIPS" headerText="FIPS"/> <mx:DataGridColumn dataField="STATE_ABBR" headerText="Abbreviation"/> <mx:DataGridColumn dataField="POP2000" headerText="Population 2000"/> <mx:DataGridColumn dataField="POP2007" headerText="Population 2007"/> </mx:columns> </mx:DataGrid> </s:Panel> </s:Application>
... View more
07-12-2012
05:07 PM
|
0
|
0
|
310
|
POST
|
Looks as though those details are not available from the api. I think you would have to parse the json. API reference: http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/ArcGISDynamicMapServiceLayer.html
... View more
03-04-2012
11:47 AM
|
0
|
0
|
732
|
Title | Kudos | Posted |
---|---|---|
1 | 11-02-2016 07:09 PM | |
3 | 11-03-2016 02:53 PM | |
1 | 10-12-2016 08:12 PM | |
1 | 10-27-2016 02:37 PM | |
1 | 10-12-2016 09:01 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|