|
POST
|
I second the use of typeahead.js it is a great tool and pretty fast. Here is a site I built using it for our search functionality you can check it out in action.
... View more
10-16-2014
10:16 AM
|
0
|
0
|
707
|
|
POST
|
So I have a popup template that is referencing a date field that is not stored in UTC so by default the popup converts what it thinks is UTC to our time zone. However the date field is already stored in our local time so I need to specify the UTC offset manually. I see there is a way to do this in the API docs for popuptemplate and it is called utcOffset however it is not clear on where exactly to put it. I have tried various places but have not been successful. Any help would be greatly appreciated.
var template = new PopupTemplate({
title: "Incident",
fieldInfos: [{
fieldName: "alarmdate",
label: "Alarm Date:",
visible: true
}, {
fieldName: "incidentnumber",
label: "Inc. #:",
visible: true
}, {
fieldName: "CallCode",
label: "Call Code:",
visible: true
}, {
fieldName: "compositeaddress",
label: "Address:",
visible: true
},{
fieldName: "Units",
label: "Unit(s):",
visible: true
}],
showAttachments: true
});
The alarmdate field is the one I am trying to add the utcOffset to I would need it to be something like +7. Thanks,
... View more
10-16-2014
10:13 AM
|
0
|
2
|
2058
|
|
POST
|
John, Your help was invaluable in getting this done! It is now working beautifully and I am very grateful! The hardest part was getting the actual file converted into a blob but I was able to do so with the below code I am posting to help anyone else with this issue.
function onSuccess(fileURI) {
window.resolveLocalFileSystemURL(fileURI, function (entry) {
var reader = new FileReader();
reader.onloadend = function (evt) {
var imageName = "someImageFilename";
var imageFormat = "jpg";
var arrayBufferView = new Uint8Array(evt.target.result);
var blobImg = new Blob([arrayBufferView], {
type: "image/jpeg"
});
var formNode = put("form", {
"method": "post",
"enctype": "multipart/form-data"
});
var formData = new FormData(formNode);
formData.append("attachment", blobImg, imageName + "." + imageFormat);
console.log("worked");
esriRequest({
url: "http://[server]/[instance]/rest/services/[folder]/[name]/FeatureServer/[layerid]/[oid]/addAttachment",
form: formData,
content: {
f: "json"
},
handleAs: "json"
}).then(lang.hitch(this, function (response) {
console.log("Attachment Success: " );
}), lang.hitch(this, function (error) {
console.warn(error);
}));
};
entry.file(function (s) {
reader.readAsArrayBuffer(s);
}, function (e) {
console.log('Error');
});
});
Once other thing that is not a huge issue but the
response.addAttachmentResponse.success
function you had in the success call for addAttachment was coming back undefined. This didn't effect the actual addAttachment function though so I just removed it. Not sure if there was a typo or something. Anyways thank you for your help!
... View more
09-03-2014
09:33 AM
|
4
|
2
|
3195
|
|
POST
|
John, Thank you a ton for your response this is starting to get me to think this might work! I had to ditch the base64 because of performance issues and went with a direct reference to the file. So I had to convert the FILE URI returned from the device Camera into a file object and from there was able to use a FileReader to convert the object to an arraybuffer to use with your provided sample.
var reader = new FileReader();
var arrayBuffer;
window.resolveLocalFileSystemURI(fileURI, function (entry) {
entry.file(function (s) {
arrayBuffer = reader.readAsArrayBuffer(s);
}, function (e) {
console.log('ee');
});
});
var imageName = "someImageFilename";
var imageFormat = "jpeg";
var arrayBufferView = new Uint8Array(arrayBuffer);
var blobImg = new Blob([arrayBufferView], {
type: "image/" + imageFormat
});
This worked great. I am however having issues with creating a form node. Your sample uses var formNode = put(... but I am unsure of where the "put" comes from. Is this a dojo method? I might just be tired and missing this but any clarification would be great. Thanks!
... View more
09-02-2014
06:23 PM
|
0
|
1
|
3195
|
|
POST
|
Doug, Thanks for your reply. Yes I am using Phone Gap to build this application. The issue with Phone Gap is that it does not support input file type. It relies on its plugins to access the file system and camera. This wouldn't be an issue except for the addAttachments only taking a form node. One possible solution that comes to mind is creating a second method that works similar to the old Flex API's addAttachment. This would allow you to send a base64-encoded string as the argument and would then get encoded to an image. Or just simply allow the addAttachments method to accept a direct URL to an image file. Both of these would allow for a more versatile and universally useful addAttachments method. Unfortunately because of other applications we have set up for viewing these attachments I would not be able to use your suggestion of using related tables. I do however appreciate the help. Is there any other work around you can think of that I could use to add an attachment. Like I mentioned earlier I can either produce a base64-encoded string of the image or I can access the image directly I just cannot use the input file type. Thanks, Isaiah Aguilera
... View more
09-02-2014
03:30 PM
|
0
|
4
|
3195
|
|
POST
|
I have a mobile phonegap application that has access to the devices camera. I am trying to take a photo and use the addAttachments method to upload the selected captured image. My problem is this method only allows for a input type file as the source. Unfortunately phonegap does not support input file types and I have to upload the captured image directly. Is there a way to add attachments without using the form type input. Any help would be greatly appreciated.
... View more
09-02-2014
11:58 AM
|
0
|
11
|
8814
|
|
POST
|
Hi Matt, What's the application dpi you use? 160? Yaan, I would actually like to revive this question and see if you can provide insight into the similar question I have. I have noticed that it is very difficult to touch a point and get an infowindow to popup at higher dpi applications. I have been at 240 and 320 both I feel are more difficult then they should be. I resorted to doing a spatial query around my finger tap to select features but It would be nice to have a sensitivity option for touch inputs. Thanks,
... View more
11-18-2013
11:48 AM
|
0
|
0
|
475
|
|
POST
|
The %20 has worked for me in the past. But another thing you could consider is trying to remove the spaces entirely from your hyperlinks. Some links will still work without the spaces depending on what the hyperlink is pointing to. But it is just a suggestion that would require some testing on your part. Hope This Helps,
... View more
10-30-2013
06:46 AM
|
0
|
0
|
324
|
|
POST
|
After that thread I still had release build problems also. I was able to solve it by making an additional change to the AttributeInspectorSkin. I had to change the memoField to use a text field. This solved my problem, not sure it will solve yours but your welcome to try. <fx:Component id="memoField">
<fieldClasses:MemoField minWidth="200"/>
</fx:Component> Change To: <fx:Component id="memoField">
<fieldClasses:TextField minWidth="200"/>
</fx:Component> Also I am on 3.4 and I am no referencing the mx.swc or sparksskins.swc at all. Everything compiles and release builds fine. Hope This Helps,
... View more
10-07-2013
08:58 AM
|
0
|
0
|
489
|
|
POST
|
After that thread I still had release build problems also. I was able to solve it by making an additional change to the AttributeInspectorSkin. I had to change the memoField to use a text field. This solved my problem, not sure it will solve yours but your welcome to try. <fx:Component id="memoField">
<fieldClasses:MemoField minWidth="200"/>
</fx:Component> Change To: <fx:Component id="memoField">
<fieldClasses:TextField minWidth="200"/>
</fx:Component> Also I am on 3.4 and I am no referencing the mx.swc or sparksskins.swc at all. Everything compiles and release builds fine. Hope This Helps,
... View more
10-07-2013
08:55 AM
|
0
|
0
|
816
|
|
POST
|
Please review following thread. This issue should help you. http://forums.arcgis.com/threads/89517-Runtime-error-with-new-3.4-API Hope This Helps,
... View more
10-07-2013
08:36 AM
|
0
|
0
|
816
|
|
POST
|
I am not aware of a way to make flex focus on a child window that is a popup. You might have to use some type of ExternalInterface and have javascript do the work. The concept of using ExternalInterface is demonstrated on this site. http://www.adobe.com/devnet/flex/articles/flex_javascript.html
... View more
09-09-2013
06:27 AM
|
0
|
0
|
452
|
|
POST
|
Tim, In the mean time I think the fastest route would be to uncheck the "delete" and "update" boxes in the service capabilities section of your map-service. This would allow the creation and posting of comments, but once submitted it would not allow deletion or modification to that feature. So others or even the posting user could not change or remove comments once submitted. Then you could moderate the data on the back end or have a separate service pointing to the same feature layer that has deletion and updating enabled. This would only take a few minutes to implement and does not use identity manager so it wouldn't require a login. You could still use a login for a moderator type person but that would only be when he wanted to change or remove comments.
... View more
09-05-2013
02:58 PM
|
0
|
0
|
598
|
|
POST
|
Your question is a little confusing. Do you want to keep the link from opening a new window? If so then you would use this. navigateToURL(new URLRequest(URL), '_self'); If you want a new window open then you would use this. navigateToURL(new URLRequest(URL), '_blank'); The window argument of the navigateToURL function is what you want to change. This is from Flex Documentation: Window: The browser window or HTML frame in which to display the document indicated by the request parameter. You can enter the name of a specific window or use one of the following values: "_self" specifies the current frame in the current window. "_blank" specifies a new window. "_parent" specifies the parent of the current frame. "_top" specifies the top-level frame in the current window. Not sure if that's what you were getting at but hope this helps.
... View more
09-05-2013
02:42 PM
|
0
|
0
|
452
|
|
POST
|
James, In the secure config file are we right in thinking that we would need to have all services public and secure included? That would be a matter of preference as I do not know exactly what you are using the services for. You could include all of the public service data in the secured service as well to avoid have to add two services but that is up to you. To gain access to applications that have our office's secure data we have our users log into an ASP.Net application first. We originally thought we would use a dynamic proxy page to launch the Flex application with secured service based on a generic ArcGIS Server user account we created. This would alleviate a user having to sign on twice to get to the flex application. If we want to continue with this route How would we laungh the flex app using the proxy page? Or would you happen to know another way of doing this? If your users are already logging on using an ASP service then to avoid having to log in twice you could generate a token for that service and embed the token in the secured config.xml within the layer tag. <layer label="Streets"
type="tiled" token="yourtoken"
visible="true"
url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> This would allow you access to the secured service without having to log in again. As far as the proxy page goes I would say its not needed but I am limited on knowledge of your situation. It would depend on whether or not you want users to view the token, or to transmit the token over the network between your web server and your users. Those are cases where a proxy would be used. Info on the how to use a proxy with flex is here: https://developers.arcgis.com/en/flex/guide/using-the-proxy-page.htm How to generate a token here: http://resources.arcgis.com/en/help/main/10.1/index.html#/Acquiring_ArcGIS_tokens/0154000005rp000000/ Hope this helps,
... View more
09-03-2013
01:59 PM
|
0
|
0
|
455
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-28-2018 05:23 PM | |
| 1 | 10-17-2019 05:08 PM | |
| 1 | 02-25-2020 02:42 PM | |
| 1 | 12-18-2018 09:17 AM | |
| 1 | 01-25-2018 08:08 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-29-2021
12:06 PM
|