POST
|
Hi Lucas, Thanks for the reply and the sample code. I tried the concept from your team's example but implemented it in our real project and yes, it does work. Thank you for the guidance. The error I've made was that I wanted to bypass the Scene/GraphicsItem paradigm and draw some simple things directly in MapGraphicsView::drawForeground(...) method of my subclass by handling the mouseMoveEvent on the said view class. I assumed that both ways would interchangeably work, which is obviously not the case. It's better to follow the Scene/GraphicsItem paradigm anyway to make the "separation of concerns" principle more uniform. Thanks again. Gabe
... View more
09-24-2018
10:10 PM
|
0
|
0
|
730
|
POST
|
Hi, I'm working on an application that needs to allow the user to draw certain graphical objects on top of the map view (in MapGraphicsView). The problem I'm having is, to some extent, related also to the default behavior of the MapGraphicsView when the user presses the left mouse button and moving the mouse while holding the button down. The default behavior is that when the user moves the mouse with the left button down, it pans the map. I've learnt the intended way to stop the map from being panned by calling accept() on the event object inside the geoViewMouseMoveEvent virtual method of my subclass. Now what I need to achieve is to draw in response to the mouse movement, for instance a line from the starting point where the user pressed down the mouse, to the current mouse cursor position in real time while the user keeps the button down. I also will need to show some tooltip-like numerical info along the drawn line. When I call accept() on the event object, it not only stops the map from being panned, but it also stops any paintEvent to be fired while moving the mouse with the button pressed (and consequentially no drawForground or drawBackground get called) until the accept() stops being called. I tried to call update() from inside the geoViewMouseMoveEvent hoping that it would coerce the MapGraphicsView to call painting methods but with no success. My question is: How do I achieve painting/redrawing to be called while blocking the map panning (as described above) when the user presses the left mouse button down and drags the mouse? Thank you in advance Gabe mapgraphicsview #painting
... View more
09-20-2018
01:12 AM
|
0
|
3
|
942
|
POST
|
Thanks, Michael. The workaround indeed works - much appreciated. Unless there is some valid reason for not making it default, I believe it would be more intuitive to make it so. Thanks for finding the workaround and the code snippets. Gabe
... View more
07-23-2018
08:02 PM
|
0
|
0
|
1571
|
POST
|
Thanks Michael, I hope you'll be able to find the cause of this. If you need any more info, please let me know. Looking forward to your findings. Gabe
... View more
07-19-2018
05:24 PM
|
0
|
2
|
1571
|
POST
|
Hello Michael, I just tried it and unfortunately it makes not difference The vector map that I downloaded under my ESRI dev account is properly anti-aliased and has always been when running my test app. Only my direct drawings remain un-antialiased.
... View more
07-19-2018
12:38 AM
|
0
|
4
|
1571
|
POST
|
Hi, I've been experimenting with ArcGISRuntime::MapGraphicsView, specifically I was to draw directly on top of the rendered map. I can successfully draw either by overriding MapGraphicsView::drawForeground(...) which receives QPainter* as its first parameter, or I also managed to do it via QGraphicsScene by retrieving the instance of it in the constructor of my MapGraphicsView derived subclass and then added to it my own QGraphicsObject based instance with its own rendering routine. Both approaches function as expected with one exception - I'm unable to make the rendering of lines and ellipses to be anti-aliased. I have been using Scene item based rendering in my other projects and always managed to get the QPainter to draw the primitives anti-aliased by setting the QPainter::setRenderHint(QPainter::Antialiasing). Since I can make the anti-aliasing work on other non-Esri types of projects, my guess is that the ArcGIS MapGraphicsView keeps tight control of the QPainter's rendering setting so even if I set the anti-aliasing inside the paint() function (on QGraphicsObject, or MapGraphicsView::drawForeground), it wont respect that flag. Can you please help and clarify what I'm missing here and how can I make the direct painting look properly aliased? Thank you in advance. Kind regards Gabe
... View more
07-18-2018
09:08 PM
|
0
|
6
|
2021
|
POST
|
Thank you, Lucas, for the additional info; I'll update my projects according to your recommendations. Cheers Gabe
... View more
06-18-2018
10:16 PM
|
0
|
0
|
1076
|
POST
|
I found out the problem. For the debugee at run-time to find the Esri modules (or any other custom QML modules for that matter), the path must be added to the QML2_IMPORT_PATH environment variable, not the QML_IMPORT_PATH, which is what I was doing. Once I added the path in my OP to this env variable, everything sprung to life. I suppose it would be a helpful piece of info in the installation instructions to have. Even if the installer/postInstaller was meant to do it, obviously sometimes for some reasons it may not happen, so it would be helpful for the devs to know some extra info to rectify the problems. Anyways, thanks.
... View more
06-07-2018
07:54 PM
|
0
|
2
|
1076
|
POST
|
Hi, I just downloaded and installed ArcGISRuntime SDK for Qt on Fedora 27. I plan to develop only for the Linux desktop so I didn't tick any mobile device options at install/postInstall time. I followed the instructions for installation on Linux. Then I downloaded an example solution for this ArcGIS DevLabs example https://developers.arcgis.com/labs/qt/display-a-map-while-offline/ It built w/o any complaints but when I tried to debug-run it would exit with the message "module Esri.ArcGISRuntime is not installed". Also the "import" lines in the QML file pulling in Esri.ArcGISRuntime module stayed red-underlined indicating it as "not found". I tried rerunning the "postInstaller" but no avail. Then I tried to reinstall the entire ArcGISRuntime SDK but again, no difference. So after some research I found that the location of the ArcGISRuntime plugins can/should be specified in the QML_IMPORT_PATH in the Qt .pro file so I added the following line to the project file: QML_IMPORT_PATH += ~/ArcGIS/runtime_sdk/qt100.2.1/sdk/Linux/x64/qml The QtCreator now stopped underlining the import line and hovering over the import line shows that it did locate the module and is showing its path. However, debug-run still fails with the same message "module Esri.ArcGISRuntime is not installed". I searched on the internet but noting more than what I've already done comes up. The Esri instructions say that the postInstaller would set up everything in the QtCreator to work with the ArcGISRuntime. But what about the debugee run-time when the Qt Framework is resolving the modules to load? Is there any ENV variable that needs to be updated with the QML module location? If so which one is it and which location should be added? Any help would be immensely appreciated, thanks.
... View more
06-07-2018
07:21 PM
|
0
|
3
|
1951
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|