Opened 7 years ago

Closed 6 years ago

#1640 closed task (fixed)

OSM: migrate trip display

Reported by: planetcruiser Owned by: planetcruiser
Priority: major Milestone: 1.2
Component: BW Geo Keywords:
Cc:

Description (last modified by planetcruiser)

http://www.bewelcome.org/trip and individual trip pages (i.e. http://www.bewelcome.org/trip/show/claudiaab) need to be migrated to OpenStreetMap

related ticket:

Change History (28)

comment:1 Changed 7 years ago by planetcruiser

  • Description modified (diff)
  • Summary changed from OSM: migrate trip overview page to OSM: migrate trip display

comment:2 Changed 7 years ago by planetcruiser

  • Owner set to toub
  • Status changed from new to assigned

comment:3 Changed 6 years ago by toub

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:4 Changed 6 years ago by toub

  • Resolution fixed deleted
  • Status changed from closed to reopened

Fixed. To be tested and review.

Commited to: https://gitorious.org/~toub/bewelcome/osm-rox Live demo here: http://rox.mishk.org/

comment:5 Changed 6 years ago by toub

  • Owner changed from toub to planetcruiser
  • Status changed from reopened to assigned

Fixed. To be tested and review.

Commited to: https://gitorious.org/~toub/bewelcome/osm-rox Live demo here: http://rox.mishk.org/

comment:6 Changed 6 years ago by globetrotter_tt

  • Milestone changed from unassigned to 0.9 - OSM

comment:7 Changed 6 years ago by planetcruiser

  • Milestone changed from 0.9 to unassigned

toub is travelling until end of september, let's reschedule this once he is back

comment:8 Changed 6 years ago by planetcruiser

  • Milestone changed from unassigned to 1.0

1.0 is the new osm release

comment:9 Changed 6 years ago by toub

  • Owner changed from planetcruiser to toub

Broken: "Error: iconUrl not set in Icon options (see the docs)."

Probably due to leaflet upgrade.

comment:10 Changed 6 years ago by toub

  • Owner changed from toub to planetcruiser

Bug fixed and pushed to osm branch.

comment:11 Changed 6 years ago by crumbking

Tested locally in develop. Ready for alpha.

comment:12 Changed 6 years ago by toub

ok in alpha

comment:13 Changed 6 years ago by toub

When an user does not have any trip, there is a bug on the map (grey).

http://alpha.bewelcome.org/trip/show/acidrongeur

Javascript stacktrace:

0 markers defined.

Error: Invalid LatLng? object: (, )

comment:14 Changed 6 years ago by toub

Also a php error displayed on the page:

resize Notice: Undefined offset: 1 in /var/rox/deployment/alpha.bewelcome.org-fde9966/build/trip/templates/map.php on line 113 Notice: Trying to get property of non-object in /var/rox/deployment/alpha.bewelcome.org-fde9966/build/trip/templates/map.php on line 113 Notice: Undefined offset: 1 in /var/rox/deployment/alpha.bewelcome.org-fde9966/build/trip/templates/map.php on line 114 Notice: Trying to get property of non-object in /var/rox/deployment/alpha.bewelcome.org-fde9966/build/trip/templates/map.php on line 114

comment:15 Changed 6 years ago by toub

Fixed to develop branch, by arbitrary centering to London if no points to display.

We should probably randomly center, but I feel that there are more urgent things to do.

Please redeploy to alpha.

comment:16 Changed 6 years ago by crumbking

Is this on alpha already? On http://alpha.bewelcome.org/trip

I see the world map but somehow a grey part on top with now map details. Should we zoom in more as default?

comment:17 Changed 6 years ago by toub

"Should we zoom in more as default? " => that's probably the best option (and also lock the min zoom).

Let's do that?

comment:18 Changed 6 years ago by toub

Now ok on alpha, I supposed that one of you fixed that :-)

comment:19 Changed 6 years ago by shevek

Planned trips/search trips overlay are way to big and don't match any style used elsewhere on the site.

comment:20 Changed 6 years ago by shevek

Actually except for the fact that there is an new map there now. Nothing seems to work right.

comment:21 Changed 6 years ago by toub

Personally, I would prefer to remove blogs and travels that spend more time fixing it...

comment:22 Changed 6 years ago by globetrotter_tt

  • Resolution set to fixed
  • Status changed from assigned to closed

Well, the OSM map is shown adn working. Better close this ticket, and not waste more time on fixing trip issues here that have been arround since the beginning.

comment:23 Changed 6 years ago by jsfan

Patchset cf73921 deployed on alpha.

comment:24 Changed 6 years ago by crumbking

  • Resolution fixed deleted
  • Status changed from closed to reopened

on http://alpha.bewelcome.org/trip/

The map look really bad in all browser. Not sure why it zooms out to level 0. (My guess no subtrips in recent trips)

To avoid that I tried this on line 19 in tripMap.js

	// center the map
	var centerLatitude = jQuery('#centerLatitude').val();
	var centerLongitude = jQuery('#centerLongitude').val();
        if (jQuery('#zoomLevel').val() =="0") 
        {
        var zoomLevel = 2;
        } else {
	var zoomLevel = jQuery('#zoomLevel').val();
        }
	mapBuilder.setCenter(centerLatitude, centerLongitude, zoomLevel);
		

Maybe there is a shorter way ;-) Could someone check if this works?

comment:25 Changed 6 years ago by planetcruiser

  • Status changed from reopened to accepted

ok, another trips usability oddness. on http://www.bewelcome.org/trip/ the map centers on a random trip at each reload. what's the point of that? eye candy i suppose. ;)

locally the osm map behaves similar to www, but no markers are displayed. trips are soooo buggy i want to switch them off entirely.

anyway, looking into this now.

comment:26 Changed 6 years ago by toub

I just realize that I posted my previous message on the mailing list instead of here:

================================================

There are also minZoom and maxZoom options:

http://leafletjs.com/reference.html

var map = L.map('map', {

center: [51.505, -0.09],

zoom: 8, minZoom: 2, maxZoom: 11 });

comment:27 Changed 6 years ago by toub

About the random center to markers, I would let it as it is, really buggy feature, better don't loose energy on that now, right?

comment:28 Changed 6 years ago by planetcruiser

  • Resolution set to fixed
  • Status changed from accepted to closed

fixed via:

quick fix: use zoom level 2 (was 0) when more than 200 trip destinations are displayed. this should do. and yes, let's not waste more time on this buggy trips implementation.

deployed and tested on alpha

Note: See TracTickets for help on using tickets.