Author Topic: TM implementation using Leaflet for mapping  (Read 11275 times)

0 Members and 1 Guest are viewing this topic.

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2727
  • Last Login:Yesterday at 10:00:41 pm
Re: TM implementation using Leaflet for mapping
« Reply #15 on: May 25, 2018, 10:18:48 pm »
Lots of improvements to mapview tonight.  Thanks for the testing so far - keep trying to break it and keep the reports coming.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4234
  • Last Login:February 13, 2024, 07:19:36 pm
  • I like C++
Re: TM implementation using Leaflet for mapping
« Reply #16 on: May 26, 2018, 03:09:49 am »
That and maybe finding a different color for our "pretend" truck route(s) for Ohio 37 around Delaware, Ohio for use on the maps.
With the way the site is set up, this has the be the same color as the rest of the Ohio State Highways system.
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2727
  • Last Login:Yesterday at 10:00:41 pm
Re: TM implementation using Leaflet for mapping
« Reply #17 on: May 26, 2018, 08:12:00 am »
I just forced the use of the Canvas renderer rather then SVG, which some sites say is a little more lightweight.  Let's see if this helps/hurts performance.

Offline vdeane

  • Sr. Member
  • ****
  • Posts: 387
  • Gender: Female
  • Last Login:Yesterday at 09:14:41 pm
    • New York State Roads
Re: TM implementation using Leaflet for mapping
« Reply #18 on: May 26, 2018, 01:58:42 pm »
I like it.  It actually seems to load faster than the existing one now.  Street view will be missed, but it's not like we can do anything about that.
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

Offline michih

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4554
  • Last Login:Yesterday at 02:35:49 pm
Re: TM implementation using Leaflet for mapping
« Reply #19 on: May 26, 2018, 02:19:39 pm »
Yes, it's loaded faster than the old version now - Thanks :)

Offline Markkos1992

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 3069
  • Last Login:Yesterday at 10:00:14 pm
Re: TM implementation using Leaflet for mapping
« Reply #20 on: May 26, 2018, 02:24:12 pm »
My main issue is that I cannot see the waypoint labels on the map when I click them on the left side of the screen though the map does go to that point..  I do see them when clicking on the actual point on the map though.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4234
  • Last Login:February 13, 2024, 07:19:36 pm
  • I like C++
Re: TM implementation using Leaflet for mapping
« Reply #21 on: May 26, 2018, 02:29:49 pm »
http://tml.teresco.org/user/mapview.php?units=miles&u=yakra&rg=NH,MA,CT,NY
Loads and works much faster than before.
I can zoom and pan with relative ease now. Show Markers still takes ~25 seconds in Firefox, ~35 seconds in Chromium.
Clicking on a waypoint produces a Popup straight away, which I can easily close.

Edit: With waypoint markers shown, panning and zooming are very laggy when zoomed closely in on the Albany area. I have to leave the mouse button depressed until I see the map move, which can take a couple seconds. Responding to zoom command takes several seconds.
If I were to attempt to Show Markers while zoomed out enough to fit the entire 4-state graph on the map -- fuhgeddaboutit!
« Last Edit: June 13, 2018, 02:21:28 am by yakra »
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline froggie

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 799
  • Last Login:Yesterday at 11:08:09 pm
Re: TM implementation using Leaflet for mapping
« Reply #22 on: May 27, 2018, 03:53:31 pm »
At first blush, I'm not a fan of Leaflet.  Does not render route shields until you're well zoomed in, and does not do a good job of populating them, either.

Offline oscar

  • TM Collaborator
  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1523
  • Last Login:Yesterday at 07:38:46 pm
    • Hot Springs and Highways pages
Re: TM implementation using Leaflet for mapping
« Reply #23 on: May 27, 2018, 05:28:57 pm »
Just testing out the Leaflet version of the Highway Browser, it seems that compared to OSM, you can only zoom in one fewer level for Stamen Toner, and four fewer for Stamen Terrain. This is probably a Stamen rather than a Leaflet issue.

I haven't noticed a problem with rendering of our own route markers (the ones above the waypoint list, not the ones shown on maps).

As for map options for the HB and ultimately the new Waypoint Editor:

-- we should probably allow lots of options at the outset, and perhaps narrow down later as non-team members get a chance to comment.

-- for HERE, there seems to be a cap on free usage; have we run into it with the Highway Browser which already has it, and would it be an issue in the Leaflet version of the HB or of a new Waypoint Editor?

-- I couldn't find the TOS for HERE [EDIT: duh, it's here, not linked to HERE's pricing page where I had looked for it], has somebody else looked and found something that would prevent us from grabbing coordinates from HERE in the Waypoint Editor? I noticed, in responding to one of julmac's comments on cansk, that HERE's mapping seemed to match Google Maps in that particular area (and both seem to be more up-to-date than OSM). But it does not match in west Maui, and indeed shows a new roadway absent from Google Maps, OSM, and Stamen, which might show how well I guesstimated the new locations of HI 30 and HI 3000 once my pending pull request is processed. If HERE's mapping uses Google Maps data or otherwise is unavailable for coordinate-grabbing, no luck; but otherwise it could be a partial replacement for Google Maps.
« Last Edit: May 30, 2018, 09:12:17 pm by oscar »

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4234
  • Last Login:February 13, 2024, 07:19:36 pm
  • I like C++
Re: TM implementation using Leaflet for mapping
« Reply #24 on: June 09, 2018, 12:19:30 am »
And if you've gotta "scrub" commercial coordinates, well...
https://github.com/yakra/tmtools/tree/master/gisplunge ;)
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca

Offline Jim

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 2727
  • Last Login:Yesterday at 10:00:41 pm
Re: TM implementation using Leaflet for mapping
« Reply #25 on: June 09, 2018, 08:14:10 am »
I'm not too concerned about running into usage limits for the non-default options as I expect the majority of our users will never bother switching from OSM.  None of the providers have any kind of ability to charge any money.  They worst that could happen is that they shut us off.

I really don't have a good idea of how much usage we generate.  Is it enough to be a problem using the OSM servers for our default maps?  I am still thinking we might want our own tile server to make sure this is not a problem.  This could be my next bigger TM-related project.

Offline vdeane

  • Sr. Member
  • ****
  • Posts: 387
  • Gender: Female
  • Last Login:Yesterday at 09:14:41 pm
    • New York State Roads
Re: TM implementation using Leaflet for mapping
« Reply #26 on: June 09, 2018, 06:05:52 pm »
Since Leaflet is faster than the old implementation I tried loading TM on my phone and am delighted that maps actually appear on my phone in a reasonable amount of time (about 10 seconds, whereas I'm pretty sure it was over a minute before).  If I ever need to look at TM while away from a computer, I now can!
Please note: All comments here represent my own personal opinion and do not reflect the official position of NYSDOT or its affiliates.

Offline Highway63

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 528
  • Gender: Female
  • Last Login:February 16, 2024, 01:40:37 am
Re: TM implementation using Leaflet for mapping
« Reply #27 on: June 10, 2018, 01:26:21 am »
The site has been loading great for me. I like all the map options.

BUT FOR THE LOVE OF RAND MCNALLY WHY WON'T ANY OF THEM SHOW COUNTY LINES?!?!?! >:( >:(

Offline si404

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 1941
  • Last Login:Yesterday at 07:12:02 pm
Re: TM implementation using Leaflet for mapping
« Reply #28 on: June 10, 2018, 04:10:33 am »
OSM / OSM German do, but you need to be relatively zoomed in. The German render shows them better, IMO.

Offline yakra

  • TM Collaborator
  • Hero Member
  • *****
  • Posts: 4234
  • Last Login:February 13, 2024, 07:19:36 pm
  • I like C++
Re: TM implementation using Leaflet for mapping
« Reply #29 on: June 13, 2018, 02:28:25 am »
Are there any other Linux users here on the forum?

While Mapview and polylines are no longer a problem for me, I've noticed that it really gets bogged down by increasing numbers of the graphical overlays used for waypoints. Graphs such as FRA-region.tmg (4774 vertices) or ME-region.tmg (3277 vertices) were laggy but mostly usable. DEU-country.tmg (36842 vertices) OTOH, was torture.

Jim suggested this may be a graphics acceleration issue, and I'm inclined to agree.

What's your experience with the new Leaflet HDX been like?
Sri Syadasti Syadavaktavya Syadasti Syannasti Syadasti Cavaktavyasca Syadasti Syannasti Syadavatavyasca Syadasti Syannasti Syadavaktavyasca