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

Add Info Window, Remove fudge factor. #57

Merged
merged 1 commit into from Feb 15, 2022
Merged

Add Info Window, Remove fudge factor. #57

merged 1 commit into from Feb 15, 2022

Conversation

wb8tyw
Copy link
Owner

@wb8tyw wb8tyw commented Feb 14, 2022

Added the info window functionality.
Finally found the way to convert between display coordinates and
point positions with out using fudge factors.
Fixed up minor issues with marker display.

d_rats/map/mapdraw.py:
remove unused get_map_base method.
Move calculating map to display offset to MapTile class.
In draw_image_at method, center icon over point.
in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy.
In draw_marker method, remove fudge factor usage.
in draw_text_marker_at method, Make sure text is centered on point.
In expose_map method, refactor to use MapTile methods to reduce
code duplication in other methods.

d_rats/map/maptile.py:
Add _set_x_origin method to calculate and store display origin as
a class variable.
Add get_display_center as a class method, as a common method of getting
the center tile offset.
Add get_display_limits to return number of display pixels for each axis.
Add get_display_tile_limits to return number of tiles for each axis.
Add get_display_origin to return the offset of the display from the
map tile numbers.
Add set_center method to store the center position of the map.
In the set_map_widget method store the the requested tile limits for
each axis as class variables
In the set_zoom method, calculate and store the maximum number of tiles
to avoid doing that calculation for every coordinate to or from degree
method called.
Removed unused deg2pixel method.
Add deg2display method to replace latlon2xy method and eliminate
fudge factors.
Add display2deg method to replace xy2latlon method and eliminate fudge
factors.

d_rats/map/mapwidget.py:
Simplify calculate_bounds method, remove fudge factor calculation.
Remove latlon2xy and xy2latlon methods.

d_rats/map/mapwindow.py:
Implement the Info Window mouse popup for points.
Shorten the mouse movement timer from 10 to 5 to be more responsive.

Added the info window functionality.
Finally found the way to convert between display coordinates and
point positions with out using fudge factors.
Fixed up minor issues with marker display.

d_rats/map/mapdraw.py:
  remove unused get_map_base method.
  Move calculating map to display offset to MapTile class.
  In draw_image_at method, center icon over point.
  in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy.
  In draw_marker method, remove fudge factor usage.
  in draw_text_marker_at method, Make sure text is centered on point.
  In expose_map method, refactor to use MapTile methods to reduce
  code duplication in other methods.

d_rats/map/maptile.py:
  Add _set_x_origin method to calculate and store display origin as
  a class variable.
  Add get_display_center as a class method, as a common method of getting
  the center tile offset.
  Add get_display_limits to return number of display pixels for each axis.
  Add get_display_tile_limits to return number of tiles for each axis.
  Add get_display_origin to return the offset of the display from the
  map tile numbers.
  Add set_center method to store the center position of the map.
  In the set_map_widget method store the the requested tile limits for
  each axis as class variables
  In the set_zoom method, calculate and store the maximum number of tiles
  to avoid doing that calculation for every coordinate to or from degree
  method called.
  Removed unused deg2pixel method.
  Add deg2display method to replace latlon2xy method and eliminate
  fudge factors.
  Add display2deg method to replace xy2latlon method and eliminate fudge
  factors.

d_rats/map/mapwidget.py:
  Simplify calculate_bounds method, remove fudge factor calculation.
  Remove latlon2xy and xy2latlon methods.

d_rats/map/mapwindow.py:
  Implement the Info Window mouse popup for points.
  Shorten the mouse movement timer from 10 to 5 to be more responsive.
@wb8tyw
Copy link
Owner Author

wb8tyw commented Feb 14, 2022

@maurizioandreotti
Copy link
Collaborator

hi John,
Now my qth is shown in the right place at all zooms. great work!

I am also testing it via radio as well... just need some traffic with positions on our local d-star repeater from other folks... will let you know

@wb8tyw wb8tyw reopened this Feb 15, 2022
@wb8tyw wb8tyw merged commit 66a6fd1 into python3_tyw Feb 15, 2022
@wb8tyw wb8tyw deleted the wb8tyw_map57 branch February 15, 2022 00:39
wb8tyw added a commit that referenced this pull request Sep 5, 2022
Added the info window functionality.
Finally found the way to convert between display coordinates and
point positions with out using fudge factors.
Fixed up minor issues with marker display.

d_rats/map/mapdraw.py:
  remove unused get_map_base method.
  Move calculating map to display offset to MapTile class.
  In draw_image_at method, center icon over point.
  in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy.
  In draw_marker method, remove fudge factor usage.
  in draw_text_marker_at method, Make sure text is centered on point.
  In expose_map method, refactor to use MapTile methods to reduce
  code duplication in other methods.

d_rats/map/maptile.py:
  Add _set_x_origin method to calculate and store display origin as
  a class variable.
  Add get_display_center as a class method, as a common method of getting
  the center tile offset.
  Add get_display_limits to return number of display pixels for each axis.
  Add get_display_tile_limits to return number of tiles for each axis.
  Add get_display_origin to return the offset of the display from the
  map tile numbers.
  Add set_center method to store the center position of the map.
  In the set_map_widget method store the the requested tile limits for
  each axis as class variables
  In the set_zoom method, calculate and store the maximum number of tiles
  to avoid doing that calculation for every coordinate to or from degree
  method called.
  Removed unused deg2pixel method.
  Add deg2display method to replace latlon2xy method and eliminate
  fudge factors.
  Add display2deg method to replace xy2latlon method and eliminate fudge
  factors.

d_rats/map/mapwidget.py:
  Simplify calculate_bounds method, remove fudge factor calculation.
  Remove latlon2xy and xy2latlon methods.

d_rats/map/mapwindow.py:
  Implement the Info Window mouse popup for points.
  Shorten the mouse movement timer from 10 to 5 to be more responsive.

Co-authored-by: John E. Malmberg <wb8tyw@gmail.com>
wb8tyw added a commit that referenced this pull request Sep 6, 2022
Added the info window functionality.
Finally found the way to convert between display coordinates and
point positions with out using fudge factors.
Fixed up minor issues with marker display.

d_rats/map/mapdraw.py:
  remove unused get_map_base method.
  Move calculating map to display offset to MapTile class.
  In draw_image_at method, center icon over point.
  in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy.
  In draw_marker method, remove fudge factor usage.
  in draw_text_marker_at method, Make sure text is centered on point.
  In expose_map method, refactor to use MapTile methods to reduce
  code duplication in other methods.

d_rats/map/maptile.py:
  Add _set_x_origin method to calculate and store display origin as
  a class variable.
  Add get_display_center as a class method, as a common method of getting
  the center tile offset.
  Add get_display_limits to return number of display pixels for each axis.
  Add get_display_tile_limits to return number of tiles for each axis.
  Add get_display_origin to return the offset of the display from the
  map tile numbers.
  Add set_center method to store the center position of the map.
  In the set_map_widget method store the the requested tile limits for
  each axis as class variables
  In the set_zoom method, calculate and store the maximum number of tiles
  to avoid doing that calculation for every coordinate to or from degree
  method called.
  Removed unused deg2pixel method.
  Add deg2display method to replace latlon2xy method and eliminate
  fudge factors.
  Add display2deg method to replace xy2latlon method and eliminate fudge
  factors.

d_rats/map/mapwidget.py:
  Simplify calculate_bounds method, remove fudge factor calculation.
  Remove latlon2xy and xy2latlon methods.

d_rats/map/mapwindow.py:
  Implement the Info Window mouse popup for points.
  Shorten the mouse movement timer from 10 to 5 to be more responsive.

Co-authored-by: John E. Malmberg <wb8tyw@gmail.com>
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

Successfully merging this pull request may close these issues.

None yet

3 participants