|
POST
|
I am using qml with js not cpp. does this fnc work for setting extent setViewpointGeometry
... View more
12-11-2020
01:47 AM
|
0
|
0
|
1282
|
|
POST
|
Hi, i m now working with offline map, now i have to set initial extent of my map, i could not find any option anywheer
... View more
12-11-2020
12:03 AM
|
0
|
4
|
1290
|
|
POST
|
Hi Please anyone ellaborate ME HOW TO CONVERT IMAGE TO BINARY or ARRAYBUFFER, SO THAT FURTHER I CAN CONVERT IT INTO BASE64
... View more
12-09-2020
09:07 PM
|
0
|
1
|
4327
|
|
POST
|
Hi, In my last post i was not able to send picture , now i can send an image to my private server with hardcode base64 data,. But i don't know how to convert an image(i have only url of that image) to base64 string, so that i can send it through xmlhttprequest, The above is possible in html with javascript, but how to do it in qt quick javascript. https://www.codegrepper.com/code-examples/cpp/convert+image+to+base64+javascript I got this link below for qt but want to do it through js. https://felgo.com/developers/forums/t/upload-jpeg-to-server-created-from-camera Exactly i m doing the same like selecting pictures from group send an array of picture to my private server.
... View more
12-08-2020
02:11 AM
|
0
|
2
|
4374
|
|
POST
|
Hi, i m trying to load maps when the application is running offline of arcgis appstudio, Is it possible? On arcgis online account i have clicked offline option, but how to load it offline, i have numerous users with differnt locations like in newzealand. currently i m loading my private maps with token generated everytime a map is loaded when user is online. but when he will be in jungle, and where there is no signal. he will sign in to his mobile app, and switch through screens of app. including map screen. I don't know how to acccomplish ths task
... View more
12-06-2020
11:15 PM
|
0
|
1
|
554
|
|
POST
|
hi @LucasDanzinger , i am now trying like convert an image to buffer then to base64 and then sending it through xmlhttp request, but at server endpoint, the image could not be retrived due to invalid bse64 value. Code is below: import QtQuick 2.13
import QtQuick.Layouts 1.13
import QtQuick.Controls 2.13
import ArcGIS.AppFramework 1.0
import Esri.ArcGISRuntime 100.6
import QtQuick.Dialogs 1.0
import Qt.labs.settings 1.0
import QtQuick.Controls.Material 2.1
import "../../controls" as Controls
import "../../assets/js/backend.js" as Backend
App {
id: appdem
width: 400
height: 640
ColumnLayout {
anchors {
fill: parent
margins: 10
}
ImageObject {
id: imageObject
onUrlChanged: {
console.log("url:", url);
}
onImageChanged: {
var buffer_data = imageObject.toArrayBuffer();
Backend.demo(buffer_data);
}
}
Button {
text: "Load"
onClicked: {
console.log("API Key::"+settings.api_key);
var img_path = "Modern-Office-3-Skype-Backgrounds.jpeg";
imageObject.load(img_path);
}
}
Image {
fillMode: Image.PreserveAspectFit
source: imageObject.url
horizontalAlignment: Image.AlignHCenter
verticalAlignment: Image.AlignVCenter
cache: false
} }} Then the demo fnc js file as below function arrayBufferToBase64( buffer ) {
var binary = '';
var bytes = new Uint8Array( buffer );
var len = bytes.byteLength;
for (var i = 0; i < len; i++) {
binary += String.fromCharCode( bytes[ i ] );
}
return Qt.btoa( binary );
}
function demo(img_binary){
var endpoint = 'insertDamageReport';
//var img_data = new Uint8Array(img_binary);
var base64String = arrayBufferToBase64( img_binary );
console.log(base64String);
//create HTTP REQUEST Object
var xmlhttp = new XMLHttpRequest();
//Opend request
xmlhttp.open('POST', "https://abc.com"+endpoint, false);
///Set header data
xmlhttp.setRequestHeader("Content-Type","application/json");
//xmlhttp.setRequestHeader( 'Content-Type', 'multipart/form-data' );
xmlhttp.setRequestHeader("X-Requested-With", "XMLHttpRequest");
xmlhttp.setRequestHeader("AuthenticationInfo",JSON.stringify({"_key":"","_secret":"","device_id":"","access_token":""}) );
//Set request to server
var data = {"user_id":60,"booking_id":1,"report_content":"test","images":base64String};
let params = (typeof data != 'undefined')?JSON.stringify(data):''
xmlhttp.send(params);
///Handle Response
if (xmlhttp.readyState === 4 && xmlhttp.status === 200) {
console.log(xmlhttp.responseText)
//return JSON.parse(xmlhttp.responseText);
}else if(xmlhttp.readyState === 4){
console.log(xmlhttp.responseText);
//return JSON.parse(xmlhttp.responseText);
}} now the problem is it could not decode the code generated of base 64 not even on online base64 to image converter tool and on my server side php files
... View more
11-26-2020
09:08 PM
|
0
|
1
|
1043
|
|
POST
|
@LucasDanzinger Yes, i am using arcgis appstudio. i am capturing photos from camera and storing it on mobile local db, after that i want to send it to my website server to be reusable on website. i am able to store it in my mobile localdb, but could not post it on my website server.
... View more
11-25-2020
08:22 PM
|
0
|
0
|
1049
|
|
POST
|
Hi, i am trying to post image to my server . how to do it with js xmlhttprequest
... View more
11-23-2020
02:12 AM
|
0
|
0
|
349
|
|
BLOG
|
Thanks for selecting me. I just want to thank u community for the help and support they give me like family. I have learned umpteen as a beginner. Thanks all!
... View more
09-09-2020
08:44 PM
|
3
|
0
|
2895
|
|
POST
|
HI i want to change cursor symbol on mouse hover of polygon graphic of only graphicslayer not for any other Graphic layer
... View more
09-03-2020
02:28 AM
|
0
|
2
|
2844
|
|
POST
|
Hi erwin, I want to know about non arcgis apps like open youtube and google maps . How to open them from arcgis apps
... View more
09-01-2020
11:51 PM
|
0
|
1
|
1736
|
|
POST
|
I want to check if mobile have any internet connection,( to send data to server)
... View more
09-01-2020
06:00 AM
|
0
|
1
|
546
|
|
POST
|
I get the popup,"this application wants to access your device location". but after that how to check if gps is active on mobile for position source. and redirect to gps property of mobile before launching application
... View more
08-28-2020
05:26 AM
|
0
|
1
|
663
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-28-2020 10:30 PM | |
| 1 | 12-27-2020 09:03 PM | |
| 1 | 05-17-2020 10:15 PM | |
| 2 | 04-21-2020 10:39 PM | |
| 3 | 09-09-2020 08:44 PM |
| Online Status |
Offline
|
| Date Last Visited |
04-30-2024
05:15 AM
|