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

Support map rotation #669

Closed
50 of 52 tasks
HarelM opened this issue Mar 30, 2018 · 21 comments
Closed
50 of 52 tasks

Support map rotation #669

HarelM opened this issue Mar 30, 2018 · 21 comments
Assignees
Labels
enhancement High Needed but there's a work around
Milestone

Comments

@HarelM
Copy link
Member

HarelM commented Mar 30, 2018

Feature

  • To be able to rotate the map when needed.
  • To be able to clear rotation and point it north.
  • To see the map rotates as the GPS is tracking my movement.

A list of things still to rewrite due to Openlayers migration:

Critical:

  • Public POI - Hover on single POI should show its name
  • Mouse cursor UX - pointing finger on feature to indicate you can click
  • Check to see if private route presentation needs a performance improvement.
  • Better sync of layers + need to make sure sync happens before adding share layer / url layer.
  • need to redefine share view behavior? maybe make it read-only and allow adding it to private routes only when the user requests it? otherwise loading the same share multiple time may cause duplication of private routes...
  • vector layer does not get rendered when animating the map - related to this issue: is updateWhileInteracting input is missing from LayerVectorComponent quentinlampin/ngx-openlayers#198

Need to test when a release candidate is available:

  • Private Route - Drag middle point on start coordinates acts weird
  • Public POI icon - add extra data indicator back
  • Private POI - Show popup when clicking in read-only mode
  • Private POI - Change mode to edit using the pen doesn't work
  • Private POI - Changing the icon doesn't work
  • Private POI - edit dialog - only opens when you click on the drop icon. Should work when clicking the description as well.
  • Private POI - Show coordinates - height doesn’t show
  • Do not load/store data in PouchDB when inside IFrame
  • First time loading causes missing icons due to missing fonts - need to wait for font to complete download.
  • Database performance is not good - need to move it out of UI thread.
  • Search - When selecting a search result, the location icon does not show on the map
  • local storage can hold up to 5Mb which is not enough - decided to use PouchDB.
  • Private Route - Improve route points style to better see direction - only in non-edit mode
  • Open File - When opening a geo-tagged image: It goes to the right location but doesn’t show a POI with the image.
  • When dragging a private POI the hover marker stays behind
  • Base maps do not need a transparency slider
  • Fix issue with public POI when adding a new one (might be a different issue since it's not a new bug) Can't delete a partially-uploaded POI #840
  • Test to see if file save workaround is still needed - iOS was not tested yet.
  • Routes from Non-IHM files do not get the right opacity and weight
  • Show/hide public POIs (eye button) shouldn’t close the list of POIs, we have the collapse button (arrow) for that and this behavior makes it harder to control the POIs you want to show. Same with public tracks.
  • Reverse track – This feature is useful where it is located (at the end nodes of tracks) but hard to find. Maybe also put it at the track properties dialog.
  • In the legend, in several categories (e.g. points of interest), the examples cover the text, making the legend useless.
  • Show route direction as it seems animation is not an option
  • Cluster markers + hover
  • Recordings
  • Read only layers - traces, missing parts, directional search
  • Snapping - when editing a route
  • Move layers to state management
  • Make all route points editable
  • Make advance route actions under a ... button
  • Replace edit route/layer icon with ...
  • Support ESRI layers
  • Clear route data - specific
  • Fit bounds - needs implementation
  • Accuracy circle for GPS - not sure how to do it
  • Animate zoom changes - fly to...
  • Drag and drop to open file
  • Make sure image gallery doesn't change the map position when interacting
  • Remove all leaflet references
  • No tooltips for the reorient (B&W arrow) button - Text: North-Up הצפן
  • When the window/screen is small and narrow, the route statistics, scale bar, and the IHM logo are partially hidden below the buttons - this was not changed.

Might not implement:

  • Hover on line - show it on chart (not sure this is important enough to implement as the other way around works well - when hovering on the chart)
  • Allow sorting of private routes - this is a problem with the new state management system...
  • In a reasonably long track, showing all POIs on the track froze the site. Consider throwing it away rather than handle it.
  • Esri feature server layer ESRI layers support under OpenLayers #860
  • Public POI/search - show geometry/route in read-only mode requires server change, will be fixed as part of Multipoligon relation shown wrong when selected on map #780
@HarelM HarelM self-assigned this Mar 30, 2018
@HarelM HarelM added enhancement Low Nice to have or feature or a very edge case bug labels Mar 30, 2018
@HarelM
Copy link
Member Author

HarelM commented Apr 6, 2018

Steps that needs to be done in order to test the branch:

  1. npm install https://github.com/va2ron1/Leaflet
  2. go to node_module/leaflet and remove module line from package.json
  3. go to dist/leaflet-src.js and add the following code below // misc:
var oldL = window.L;
function noConflict() {
	window.L = oldL;
	return this;
}

// Always export us to window global (see #2364)
window.L = exports;

in base-poi-marker.layer.ts:

import { MarkerClusterGroup } from "leaflet.markercluster";`
...
protected markers: MarkerClusterGroup;
...
this.markers = new MarkerClusterGroup({

@JasonRodman
Copy link

Any updates on this feature? The ability to rotate the map is a must for me to be able to adopt Leaflet in my project. I went thru a full implementation before I realized it did not support it.

@HarelM
Copy link
Member Author

HarelM commented Jun 16, 2018

@JasonRodman I'm not a leaflet maintainer. you should probably post your concerns in the following issues:
Leaflet/Leaflet#268
va2ron1/Leaflet#5
Judging by how it has progressed so far if this is a must for you I would try and use a different library.
I'm looking into openlayers and angular-cesium right now to see if I can migrate this project.

@HarelM
Copy link
Member Author

HarelM commented Jun 18, 2018

Another approach to rotate would be rotate and 3D to be able to better see how the landscape looks.
A short POC I'm working on is using angular-cesium:
It has the ability to show 2D and 3D maps. to rotate the view and has full support to angular which is good.
This will require a very big UI change and I'm not sure it's needed. Never-the-less, it's fun playing with it.
image
Kinneret with IHM map in 3D.

@HarelM
Copy link
Member Author

HarelM commented Jun 19, 2018

While the above is somewhat nice the 3D effect of the map does not give the right perspective IMO, the terrain in not giving the effect I was hoping for and therefore the only lightweight option right now is openlayers.

@zstadler
Copy link
Member

See also TileLayer.GL

@HarelM
Copy link
Member Author

HarelM commented Aug 15, 2018

Thanks for the link!
However, I'm not sure how to use the TileLayer.GL to do the rotation... :-/
I've read some of the docs and some instruction on webGL but I can't figure it out, I'm also concerned that the rotation will happen on every tile separately and so there will be a lot of code to write in order for this to work properly, and it won't work for the esri layers.
Bottom line, I'm not sure this is the right approach, I tend to go with an exiting solution - i.e. openlayers...

@valleyofdawn valleyofdawn added the App Native application related issues label Sep 14, 2018
@valleyofdawn
Copy link

This is important for the navigation abilities of the app. It's much easier to decide on turns when the map faces with the direction of movement up. I suggest moving the priority to medium or high.

@HarelM
Copy link
Member Author

HarelM commented Sep 27, 2018

Html icons:
https://gis.stackexchange.com/questions/253194/create-marker-icon-based-on-html-code-for-openlayers

This seems like a unneeded complexity.
The solution is probably to generate image icons for all of the needed marker icons.

@HarelM
Copy link
Member Author

HarelM commented Sep 28, 2018

Since we are migrating out of leaflet, there's a need to define the look and feel of the on screen buttons.
To align this with the rest of the app I'll be using Material design buttons, with not margins (Ignore the blue tint to some of the buttons, it will be fixed once leaflet style is completely gone):
image

@zstadler
Copy link
Member

zstadler commented Sep 29, 2018

One of the original requirements was

  • To be able to clear rotation and point it north.

There is a need for button to switch between map rotation and north up.

Perhaps a diagonal arrow ( or ) can indicate map rotation, and a vertical, compass-like arrow would indicate a north-up mode ( )

follow_arrow.svg.zip
follow_arrow2.svg.zip
north_up.svg.zip

@HarelM
Copy link
Member Author

HarelM commented Sep 29, 2018

Good point, thanks for reminding me. I'll add it below the location after the entire migrating will be done.

@zstadler
Copy link
Member

As a user, I would like to be able to rotate the map manually. For example, when not moving or when the GPS is inactive.
Therefore, I think the map orientation button needs to be available at all times and probably not grouped with the GPS icon (unlike the record button).

@HarelM
Copy link
Member Author

HarelM commented Sep 29, 2018

Of course, I just said where it will be...

@valleyofdawn
Copy link

Another option is for the current location arrow itself to be pressable. Pressing on it will move from direction up to north up.

@zstadler
Copy link
Member

zstadler commented Sep 29, 2018

What do you mean by "current location arrow"? The GPS activation button? The current location icon on the map?

In any case, canceling manual map rotation is needed even when there is no "current location".

HarelM added a commit that referenced this issue Nov 26, 2018
HarelM added a commit that referenced this issue Nov 29, 2018
HarelM added a commit that referenced this issue Nov 30, 2018
HarelM added a commit that referenced this issue Nov 30, 2018
… dialog. remove comments, added some TODOs.
HarelM added a commit that referenced this issue Dec 3, 2018
Update to angular 7 #861 - reduce angular-cli back to 6.1.6 to prevent out of memory.
@HarelM
Copy link
Member Author

HarelM commented Dec 5, 2018

Since I'm not planning or reverting all this work I'll just merge this to master and split all the remaining work to separate issues.

@HarelM HarelM closed this as completed Dec 5, 2018
HarelM added a commit that referenced this issue Dec 5, 2018
* Support map rotation #669 - initial commit. a complete rewrite of the site to use openlayer, still not complete. Resolves #402 - Support global undo instead of undo per route.

* Support map rotation #669 - lint fixes, added north icon.

* Support map rotation #669 - Fix compilation due to unused events.

* Support map rotation #669 - Remove events and some leaflet usages.

* Support map rotation #669 - Fix compilation, removed more $events.

* Support map rotation #669 - Fix compilation

* Support map rotation #669 - Fix compilation due to unneeded classes.

* Support map rotation #669 - remove some unused code.

* Support map rotation #669 - Added clustering and route recording, fixed tranlation typos, added missing translations, fixed other small stuff to make things work.

* Support map rotation #669 - added make all route points editable.

* Replaced wrench with 3 vertical dots. #669

* Support various clear route options #669

* Resolves #787 - Allow opening of a specific POI in a group.
Related to #669.

* Support map rotation #669 - Added mapserver support using xyz tiles.

* Support map rotation #669 - Added snapping back. removed unused code.

* Support map rotation #669 - bring back tests.

* Support map rotation #669 - small correction related to cordova.

* Support map rotation #669 - remove leaflet, fixed delete route, updated file saver.

* Support map rotation #669 - Fix lint.

* Support map rotation #669 - Fix tests.

* Support map rotation #669 - Split android and web builds

* Support map rotation #669 - Split build, fix yml.

* Support map rotation #669 - Fix compilation after lint required fixes  :-/

* Support map rotation #669 - Throw if angular build fails.

* Support map rotation #669 - Fix android build due to split

* Support map rotation #669 - Updated version to 8.0

* Support map rotation #669 - Added GPS location interaction.

* Support map rotation #669 - Moved most of the popups to be overlays.

* Support map rotation #669 - Fix production compilation

* #669 - Moved pure map components to a folder.

* #669 - fix compilation.

* Fixed issue with version in GPX and improve description of uploaded OSM trace.

* Support map rotation #669 - Added traces layer and ability to manipulate.

* Fixes #856 - Fix failing android builds

* Support map rotation #669 - Fix tests, fix issue with animation override when following GPS location.

* Support map rotation #669 - facilitate drag and drop of a file.

* Support map rotation #669 - Fix fit to bounds. Fix legend. Fix move to search results.

* Support map rotation #669 - add zoom animation for zoom-in/out

* Support map rotation #669 - remove unwanted OSM layer.

* Support map rotation #669 - Moved layers and user to state management.

* Support map rotation #669 - Make advance route actions under a ... button

* Support map rotation #669 - Fix lint

* Support map rotation #669 - Fix production build, remove opacity from base layer, changed opacity slider to be green.

* Support map rotation #669 - reverse route in route properties, fixed some mouse events, fixed visibilty of route.

* Support map rotation #669 - Fix toggle category layer causes collapse.

* Support map rotation #669 - Fix incorrect color and weight.

* Support map rotation #669 - Fix production compilation due to missing method.

* Error adding routes to OSM #848 - Might be related, but might be a different issue.

* Support map rotation #669 - add route direction

* Support map rotation #669 - show direction only in readonly mode, show route points only in route editing mode. emit null when dragging interaction to hide hover marker.

* Support map rotation #669 - Fix opening a file that has only markers.

* Support map rotation #669, Support offline tiles #783 - Added PouchDB, update technology stack

* #669 - Update reducer action decorator to hold all the relevant classes.

* Support map rotation #669 - Show searchresult marker, fix production build

* Support map rotation #669 - Fix lint, move search results to poi service.

* Support map rotation #669 - Improve search results icon and some errors.

* Support map rotation #669 - improve private POI UX. added icons to private POI back.

* Support map rotation #669 - support database writing in another thread.

* Support map rotation #669 - make sure font loads before anything else to prevent missing icons on the map.

* Avoid using environment but use running context instead.

* Support map rotation #669 - Fix issue with a segment with a single point.

* Support map rotation #669 - add tooltip to north-up

* Support map rotation #669 - do not store and read state when runnning inside iFrame.

* Support map rotation #669 - Add extra data indicator.

* Resolves  #861 - Update to angular 7

* Support map rotation #669 - Add coordinates and height to private POI dialog. remove comments, added some TODOs.

* Update to angular 7 #861 - Update typescript to 3.1.6, remove unused import.

* Update to angular 7 #861 - remove css files to reduce build time? change appveyor worker cloud

* Support map rotation #669 - Small fix to route editing.

* Update to angular 7 #861 - downgrade to 7.0.4 to check if this solves build issues.

* Another attempt to fix appveyor run...

* Support map rotation #669 - Make recording work.

* Support map rotation #669 - fixed issue with undo.
Update to angular 7 #861 - reduce angular-cli back to 6.1.6 to prevent out of memory.

* Update to angular 7 #861 - Increase memory limit to all commands.

* Update to angular 7 #861 - Update typescript for cli.

* Update to angular 7 #861 - Fix lint.

* Fixes #866 - Geo-tagged images won't open (beta)

* Moved to ngx-openlayers next version. #669
HarelM added a commit that referenced this issue Jan 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement High Needed but there's a work around
Projects
None yet
Development

No branches or pull requests

4 participants