Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using maker and drawing points #14

Open
EmbeddedAndMore opened this issue Feb 20, 2015 · 3 comments
Open

using maker and drawing points #14

EmbeddedAndMore opened this issue Feb 20, 2015 · 3 comments

Comments

@EmbeddedAndMore
Copy link

hi.
it's not actually an issue . after a lot searching i found your code vary suitable for my job because,
1- it can saves the tiles and use the map without network.
2- it's simple
3- it's written in c++ and Qt(my code is in Qt too)

so, is there any possibility i can
1- use marker when i double click some where in map .??
2- draw some color points in map with it's coordinate ??

ow can i get the coordinate of the point in map where i double click on it ??

any help would be great.

thanks in advance.
MA.

@raptorswing
Copy link
Owner

Hi,

Glad that you have found this code helpful.

The easiest way might be to write a class which inherits MapGraphicsView and overrides the virtual mouse-handling events in that class.

There is an example of this in another one of my projects (which consumes this project) here: https://github.com/raptorswing/FlightPlanner/tree/UserStudy/WaypointPlanner/gui

See the "WaypointMapView" class.

Hopefully this helps.

@EmbeddedAndMore
Copy link
Author

thanks raptorswing for the response .
in last 2 3 days i was working on your code , that's really good,
i add waypoints by double click ,
remove points,
make a polygon with those points,
and also changed it's server to Bing satellite server.

there was some problem to convert cursor position to latitude and longitude(find method in your code),well because of my weakness :)
although i'm not so good in ObjectOriented and inheritance but i did something :)

last night i was thinking it will be grate if it's possible to add markers(instead of points(circles)) and sequence number of marker added to map beside it's marker (for waypoints,) and/or another .png image as UAV(multirotor) .
now it is :
2-25-2015 2-06-48 pm

and i want to be :
2-25-2015 2-11-10 pm

is it possible now with current code?? if not , any help would be grate

@raptorswing
Copy link
Owner

Hi,

Yes, it's definitely possible to add custom markers for a series of points. It looks like you've experimented with the PolygonObject provided in MapGraphics. This may not be the best choice for representing the flight path of a UAV since PolygonObject will always make a loop.

When I was working on a similar effort I represented a UAV's flight path as a series of connected LineObject objects. I used a wrapper class to manage the LineObjects based on inputs (adding a new waypoint, deleting a waypoint, moving a waypoint, etc.).

These might be helpful as examples:
https://github.com/raptorswing/FlightPlanner/blob/UserStudy/PlanningCommon/WaysetDisplayManager.cpp
https://github.com/raptorswing/FlightPlanner/blob/UserStudy/PlanningCommon/MapObjects/Waypoint.cpp

In fact, you might be able to get some reuse in general out of the WaypointPlanner sub-project here: https://github.com/raptorswing/FlightPlanner/tree/UserStudy . If you build the top-level FlightPlanner project you should be able to run WaypointPlanner and get some context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants