POST
|
So i'm just kicking off my first WAB widget and immediately running into an issue trying to set map click handlers when the widget is opened. Looking through the esri coordinate widget i found this... this.own(on(this.map, "click", lang.hitch(this, this.onMapClick))); But I just can't get it to register the event, here's my full code... define([
'dojo/_base/declare',
'jimu/BaseWidget',
'esri/geometry/Point',
'esri/SpatialReference'
],
function(declare, BaseWidget) {
//To create a widget, you need to derive from BaseWidget.
return declare([BaseWidget], {
// Custom widget code goes here
baseClass: 'jimu-widget-customwidget',
startup: function() {
this.inherited(arguments);
//this.mapIdNode.innerHTML = 'map id:' + String(this.map.getScale());
},
onOpen: function(){
this.own(on(this.map, "click", lang.hitch(this, this.onMapClick)));
},
onMapClick: function(event) {
window.alert('map click');
this.mapIdNode.innerHTML = 'map id:' + String(event.mapPoint.x);
}
});
}); I'm very confused why this isn't working. Also does anyone know where i can find better documentation specific to the WAB? i also found this in the measurement widget and trying to work out the differences is giving me a headache, there seems to be a lot of methods/functions not found in the JSAPI and it would be nice to know what they are. if (this.map && this.map.webMapResponse) {
var handler = this.map.webMapResponse.clickEventHandle;
if (handler) {
handler.remove();
this.map.webMapResponse.clickEventHandle = null;
}
} Thanks all! Richard
... View more
01-22-2015
08:56 AM
|
0
|
4
|
6120
|
POST
|
Did you get an answer for this? I want to use portal but cannot set AGS to federate or use https because it will break a number of non mapping systems that use our services to access GIS data via REST. I notice ArcGIS Online uses https for the login page then http for the map display, that allows me to add internal services without triggering the secure content block in the browser. If there's a solution for AGOL there must be one for portal?
... View more
10-24-2013
11:22 AM
|
0
|
0
|
298
|
POST
|
I've been able to re-produce this problem fairly consistently, the more sublayer popups you have configured against a single service the more likely it is to occur, i have a service with 60 sublayers each with their own popupconfig and it occurs every time. My theory is along the same line as those above, i think that the get layer details request is taking longer due to the size of the service and the toc is trying to set itself before the visiblelayers property is set, hence why it returns the null. This also may be why some experience the problem intermittently because the request time will vary with network traffic and also whether flash player has cached the application or not, if i flush the FP cache the error is always triggered, refreshing the browser often won't as the app is loading faster from the cache. I used the same workaround as Robert by just adding... if (arcGISDynamicMapServiceLayer.visibleLayers) That fixes the error but i'm still trying to work out what functionality is potentially lost as a result, my general feeling is that since the error doesn't happen very often it won't be too noticeable by the users.
... View more
02-13-2013
09:52 AM
|
0
|
0
|
578
|
POST
|
Experiencing the same problem here, i've logged the issue with esri support and will update the thread if i have any news. Seems to happen for me on sublayer popups only and occurs in the getlayerinfos code in createChildren (TocMapLayerItem). When loading the toc the layer info returns a null which interrupts the widget loading process causing the UI to look a bit crazy. I'm using AGS 10.0 and the uncompiled FV 3.1.
... View more
01-28-2013
12:15 PM
|
0
|
0
|
548
|
POST
|
FB 4.5 allows you to create mobile applications for iOS and Android, you create the app and FB exports it into native code that allows you to install it onto the device. Since this uses the standard ESRI API all of the standard features are available including editing (although not offline at the moment, i think this is on the way). As always Mansour explains it better than i ever could, check out the updated links at the top... http://thunderheadxpler.blogspot.com/2010/11/how-to-use-esri-flex-api-on-android-and.html You have to design it as a mobile app so there is a learning curve, for example there are many new methods that manage gesture inputs. The talk of Apache is because Adobe are donating Flex to the Apache Foundation and will become a contributor instead of owner... http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html
... View more
01-03-2012
11:30 AM
|
0
|
0
|
162
|
POST
|
I used to split my map services in the app as discussed, so just a warning that it totally throws off any service stats. If you have a service with 10 layers that are referenced individually each site hit results in 10 service hits, this happens whether the layer is set to visible or not - some stats can be adjusted but many can't. I had to accept the loss in functionality as i need accurate performance stats, the performance loss wasn't bad at all though, i certainly never had any complaints from users.
... View more
11-12-2011
09:59 AM
|
0
|
0
|
579
|
POST
|
I had similar issues with the layout of the attribute inspector and ended up designing my own version from scratch using a default form and combo boxes, getting the domains into dropdowns is pretty simple (the flex viewer has a sample widget with everything you need, i stole the code from that) and then you have complete control over the layout. It's admittedly a lot more work but in my opinion the results were far better as i could have the layout 100% as i intended. That also means you have to have a custom edit function as well, but that was surprisingly easy since it's just passing a graphic into the feature layer. I really like the out of the box tools for attribute editing but when you need something a little different i prefer to design my own.
... View more
11-12-2011
09:48 AM
|
0
|
0
|
230
|
POST
|
You can open a pre-populated e-mail window using URLRequest... private var contactURL:URLRequest = new URLRequest("mailto:test@email.com&subject=e-mail subject&body=I'm sending an e-mail"); But this will only open a new e-mail window using the default mail provider, the user will have to click send for it to be triggered. To automatically send an e-mail i think you'll have to use a server side script of some sort. Alternatively Adobe do offer MS exchange integration in ColdFusion but that might be a whole new level than you might not be looking for.
... View more
03-28-2011
01:40 AM
|
0
|
0
|
255
|
POST
|
Thanks Dasa. Example attached (AttributeInspector.png), in this the Panel is set to 250x350 and the AttributeInspector is 100%, yet the FieldInspector is shooting out the side of the parent conatiner. Ideally i'd like to control the width of the TextInput via the container. At the moment they seem to always be a fixed size depending on the data type, in this example the Name attribute is a 50 char text field while the ID is a double, which results in them being different widths. I'd also like the ability to change the height of the Name TextInput as it's bigger than necessary, but again that seems to be a fixed property. I've also attached another example (AttributeInspector2.png), where both the Panel and AttributeInspector are set to 100%, the problem here is that the Delete/Next/Back buttons sit a third of the way up from the bottom, despite the parent AttributeInspector container filling the entire panel. I would ideally like to be able to move these so they sit right at the bottom. Thanks, Richard
... View more
03-23-2011
02:07 AM
|
0
|
0
|
657
|
POST
|
Hi All, I've been playing around with the new editing components and are finding the attribute inspector very limited in it's format and appearance. It seems to use TextInput and RichEditableText spark components and resize them according to the data column width. What i'd like to know is whether it's possible to resize them manually, the FieldInspector component doesn't have a width property. Ideally the AttributeInspector would display the inputs in the Design tab in Flash Builder and enable you to change the allignment properties but at the moment it just shows a blank container. I'd also like to move the Delete/Next/Forward buttons and the '1/2' indicator, but again they're in a fixed location. It's an excellent component for functionality but at the moment i'm having to manually code all the editing features into a custom input form just to cater for the fact that i'd like all my input boxes to align nicely, which is a bit wasteful. Thanks
... View more
03-22-2011
04:33 AM
|
0
|
8
|
2725
|
POST
|
To change the datafield value you need to assign the column an id: <mx:DataGridColumn id="dgc" dataField="PARCELID"/> then in your doQuery function change the dataField value: dgc.dataField = 'LAND_NAME'; Regarding the case sensitivity, to be honest i'd normally recommend a Find Task rather than Query for that as Find ignores case sensitivity by default, have a look here.. http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=FindTask Because you're using a Query Task with a SQL where clause it's a lot harder. The problem you'll also find with your where statement is that you've used Lower('%[value]%')", this converts the value to lower case, but you'll need to be sure that all the attributes in your source data are lower case as well, if the attribute table features a mixture of lower and upper case e.g. New York then your where clause will end up very complicated. The downside to a Find Task is that it doesn't return all the attribute values, just the columns that it finds results in. The choice is really dependent upon the data source as they both are more suitable under different circumstances.
... View more
08-12-2010
02:55 AM
|
0
|
0
|
477
|
POST
|
To remove the shape_ columns you need to specify this in the datagrid. Change: <mx:DataGrid dataProvider="{queryTask.executeLastResult.attribu tes}" scroll="true" width="100%" height="40%"/> To: <mx:DataGrid dataProvider="{queryTask.executeLastResult.attributes}" scroll="true" width="100%" height="40%">
<mx:columns>
<mx:DataGridColumn dataField="PARCELID"/>
</mx:columns>
</mx:DataGrid> The query doesn't work because your query is still looking for PARCELID which isn't an attribute in the land use and zoning layers, you need to change the doQuery function to change this dynamically. private function doQuery():void
{
if (myLAYER.selectedItem.data == 2) {
query.outFields = ['ZONING_CODE'];
}
else if (myLAYER.selectedItem.data == 1) {
query.outFields = ['LANDUSE_CODE'];
}
queryTask.execute(query, new AsyncResponder(onResult, onFault));
} Also be aware that this is a case sensitive search, the default value you have in the search box is a parcel id, so you'll need an exact zoning or land use code to search with. You'll also need to change the dataField value on the DataGridColumn as well.
... View more
08-11-2010
08:03 AM
|
0
|
0
|
477
|
POST
|
It's better to set the transparency in Flex rather than ArcMap. Leave the layer as 100% in ArcMap then go into the <ArcGISDynamicMapService/> tag and set the alpha to 0.5.
... View more
08-10-2010
03:03 AM
|
0
|
0
|
503
|
POST
|
Thanks Dasa, not much i can really do about it then i guess, probably wait for a Degrafa build for Flex 4 which hopefully should do the trick.
... View more
08-10-2010
02:59 AM
|
0
|
0
|
181
|
POST
|
Does anyone know why the zoom slider still uses a halo (mx) VSlider and not spark, i'd like to utilise some of the new skinning techniques in Flex 4 but it throws up an error when i create the slider as a spark component. It seems odd as all the rest has been converted... http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=NavigationDataTip ...the only one that hasn't is the slider? :confused: Thanks
... View more
08-09-2010
05:07 AM
|
0
|
2
|
1070
|
Online Status |
Offline
|
Date Last Visited |
01-09-2022
06:47 AM
|