POST
|
Yes, but, it depends on the QML component you use. Some QML components implement an `icon` which can be used to scale (with resampling) and recolor SVGs, e.g. property url bikingSvg : "https://raw.githubusercontent.com/Esri/calcite-ui-icons/master/icons/biking-32.svg" ItemDelegate { icon . source : bikingSvg icon . color : "blue" icon . width : 32 icon . height : 32 text : qsTr ( "ItemDelegate" ) } You may find it useful to use the icon property in common components such as Button, ToolButton, MenuItem, e.g. Button { icon . source : bikingSvg icon . color : "blue" icon . width : 32 icon . height : 32 text : qsTr ( "Button" ) } However, if you use Image, and you will need to take care of resampling and coloring yourself. Resampling is needed with the sourceSize property and coloring needs to be done by the ColorOverlay property. Using the Image object in this way allows you to do layering with different colors for different layers property url bikingSvg : "https://raw.githubusercontent.com/Esri/calcite-ui-icons/master/icons/biking-32.svg" property url disallowSvg : "https://raw.githubusercontent.com/Esri/calcite-ui-icons/master/icons/circle-disallowed-32.svg" Item { width : 32 height : 32 Image { id : bikingImage anchors . fill : parent source : bikingSvg sourceSize : Qt . size ( width , height ) } ColorOverlay { color : "blue" anchors . fill : bikingImage source : bikingImage } Image { id : disallowImage anchors . fill : parent source : disallowSvg sourceSize : Qt . size ( width , height ) } ColorOverlay { color : "red" anchors . fill : disallowImage source : disallowImage } }
... View more
03-25-2020
06:32 PM
|
0
|
0
|
148
|
POST
|
Hi jose, I noticed that you mention that: > camera sometimes came in black Does this mean that the camera actually works sometimes? Can we clarify how often it does work vs how often it does not work? - Camera works none of the time - Camera works some of the time - Camera works most of the time When the camera does not work, can you describe how you're operating Survey123. Could it be that you're tapping the Camera icon twice? Stephen
... View more
01-02-2020
02:07 PM
|
0
|
1
|
121
|
POST
|
Hello Eli, Perhaps you can try supply a projection file for that layer. In ArcPad, you can find a copy of NAD_1983_StatePlane_NorthCarolina_FIPS_3200_Feet here: "C:\Program Files (x86)\ArcGIS\ArcPad10.2\Coordinate System\Projected Coordinate Systems\State Plane\NAD 1983\NAD 1983 StatePlane North Carolina FIPS 3200.prj" Take a copy of this file and rename it in a name consistent with your MrSID file and/or JPEG file with the extension set to ".prj". i.e. " NCMECK006017.prj". Then next time you add this MrSID file to ArcPad, ArcPad should notice the PRJ file and it will use that file rather than trying to "guess" it from reading the MrSID. Stephen
... View more
12-03-2019
01:41 PM
|
1
|
1
|
105
|
POST
|
Hi Jorge, Thank you for your reply. I have rewritten the example as a complete working application so you should no longer have issues running it. In my of my code today, I now use the FileInfo object, with this: You get automatic shortcut to AppFramework.userHomePath via "~" You can get the physical path, i.e. FileInfo.filePath You can get the url (useful to assigning to Image.source), i.e. FileInfo.url You have access to the container folder via FileInfo.folder which is a FileFolder object which you can use to do folder operations, such as fileExists, delete, makeFolder I hope you find this example more useful. Stephen
... View more
10-21-2019
02:48 PM
|
0
|
0
|
84
|
POST
|
Make sure the folder exists. Use FileFolder.makeFolder() to do this. import QtQuick 2.12 import QtQuick . Controls 2.12 import QtQuick . Layouts 1.12 import ArcGIS . AppFramework 1.0 App { id : app width : 400 height : 640 property FileInfo target : FileInfo { filePath : "~/ArcGIS/AppStudio/Images/logo.png" } ColumnLayout { anchors . fill : parent anchors . margins : 10 Image { id : image } NetworkRequest { id : networkRequest url : "https://appstudio.arcgis.com/images/index/logo-appstudio.png" responsePath : target . filePath onReadyStateChanged : { if ( readyState !== NetworkRequest . ReadyStateComplete ) return ; image . source = target . url } } Button { text : qsTr ( "Download Now" ) onClicked : { target . folder . makeFolder ( ) ; networkRequest . send ( ) ; } } Item { Layout . fillHeight : true } } }
... View more
10-04-2019
11:00 AM
|
0
|
2
|
84
|
POST
|
Hello Ritwik, On ArcPad's Browse toolbar there's the "Measure" tool. See the ArcPad documentation on "The Browser toolbar": help.arcgis.com/en/arcpad/10.0/help/index.html#/The_Browse_toolbar/00s100000045000000/ Here's a video of the "Measure" tool in action. In this video, we measure the width and height of a parcel, then, we measure the permiter of a park. Stephen
... View more
09-22-2019
05:52 PM
|
0
|
0
|
53
|
POST
|
Thanks Paul, I'm using a similar version. In one of the troubleshooting sessions, I modified the header of "moment.js" to the following: //! moment.js ; ( function ( global , factory ) { typeof exports === 'object' && typeof module !== 'undefined' ? module . exports = factory ( ) : typeof define === 'function' && define . amd ? define ( factory ) : global . moment = factory ( ) console . log ( "typeof(global): " , typeof ( global ) ) ; global [ "one" ] = 1 ; global [ "two" ] = 2 ; global [ "three" ] = 3 ; global [ "key" + Math . random ( ) ] = 1 ; console . log ( "global keys: " , JSON . stringify ( Object . keys ( global ) ) ) ; } ( this , ( function ( ) { 'use strict' ; Then in my app, I imported "moment.js" twice: import "moment.js" as Moment1 import "moment.js" as Moment2 On the first import, this yielded the following output: qml : typeof ( global ) : object qml : global keys : [ "moment" , "one" , "two" , "three" , "key0.3286030239782699" ] On the second import, this yielded the following: qml : typeof ( global ) : object qml : global keys : [ "moment" , "one" , "two" , "three" , "key0.3286030239782699" , "key0.7088453144951244" ] i.e. what appears to be happening, is the value of "this" which later becomes "global" refers to Javascript object in the global namespace. What the moment.js library is trying to do is install a moment() as a function in the global namespace. For good measure, I wanted to see if I can put some random keys in the global namespace as well, and, yes, that appears to have worked too. This means when you use these objects in your app, you don't need to use the specifier, i.e. I didn't use either Moment1 nor Moment2. I just referred to the moment() function directly. Similarly, for the other items I added in the global namespace, I could access them too, e.g. Text { text : three // 3 } If you still cannot get it to work, then, yes, feel free to refer to my workaround, i.e. //! moment.js var moment ; ( function ( global , factory ) { typeof exports === 'object' && typeof module !== 'undefined' ? module . exports = factory ( ) : typeof define === 'function' && define . amd ? define ( factory ) : global . moment = factory ( ) moment = global . moment } ( this , ( function ( ) { 'use strict' ; Then, in your app, use the workaround as follows: import QtQuick 2.7 import QtQuick . Controls 2.1 import ArcGIS . AppFramework 1.0 import "moment.js" as Moment App { id : app width : 400 height : 640 property var moment : Moment . moment Text { text : moment ( ) . format ( "dddd" ) } } Stephen
... View more
09-09-2019
08:25 PM
|
0
|
0
|
189
|
POST
|
Hi Paul, I had numerous attempts at this over the weekend. The first version I did was the workaround which you got a copy from the email. However, I found the workaround ugly. When I retested the "import" as is, I found it to just work with my version of AppStudio. I will do some further troubleshooting, but, can you tell me which version of Qt you are using? Stephen
... View more
09-08-2019
11:07 PM
|
0
|
2
|
189
|
POST
|
Hi Paul, I did some troubleshooting but found that the "moment.js" works by default, e.g. Import the with the usual syntax: import "moment.js" as Moment Use the moment() function as per documentation Here's an example usage: import QtQuick 2.7 import ArcGIS . AppFramework 1.0 import "moment.js" as Moment App { id : app width : 400 * AppFramework . displayScaleFactor height : 640 * AppFramework . displayScaleFactor Column { anchors . fill : parent anchors . margins : 10 spacing : 10 Text { text : JSON . stringify ( moment ( ) ) // "2019-09-06T21:46:33.916Z" } Text { text : moment ( ) . format ( 'MMMM Do YYYY, h:mm:ss a' ) // September 7th 2019, 7:47:08 am } Text { text : moment ( ) . format ( "dddd" ) // Saturday } Text { text : moment ( ) . format ( 'YYYY [escaped] YYYY' ) // 2019 escaped 2019 } Text { text : moment ( ) . format ( ) // 2019-09-07T07:48:57+10:00 } } }
... View more
09-06-2019
02:31 PM
|
1
|
4
|
189
|
BLOG
|
Hi everyone, with your help, we have received a fix to the Promise chaining bug https://bugreports.qt.io/browse/QTBUG-71329. The fix will be bundled in with the next release of AppStudio 4.0. As soon as AppStudio 4.0 is out, I will update the content of all blogs to reflect Promise chaining as a viable coding pattern for AppStudio.
... View more
08-12-2019
08:45 PM
|
0
|
0
|
126
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|