Opened 7 years ago

Closed 6 years ago

#1638 closed task (fixed)

OSM: migrate blog post display

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

Description

blog posts with geo information will show a map. examples:

they need to be migrated to OpenStreetMap

related ticket:

Change History (24)

comment:1 Changed 7 years ago by planetcruiser

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

comment:2 Changed 6 years ago by toub

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

comment:3 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:4 Changed 6 years ago by toub

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

comment:5 Changed 6 years ago by globetrotter_tt

  • Milestone changed from unassigned to 0.9 - OSM

comment:6 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:7 Changed 6 years ago by planetcruiser

  • Milestone changed from unassigned to 1.0

1.0 is the new osm release

comment:8 Changed 6 years ago by toub

Fixed, merged with develop branch, then pushed to a new temporary branch named "osm": https://gitorious.org/bewelcome/rox/commits/osm

Ready for tests and review.

Please note that editing/creating blog trip has been reopen #1639

comment:9 Changed 6 years ago by crumbking

Tested locally in develop. Ready for alpha.

comment:10 Changed 6 years ago by toub

ok on alpha

comment:11 Changed 6 years ago by globetrotter_tt

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

Works for me. Tested with Firefox 18 and Chromium 22.

comment:12 Changed 6 years ago by crumbking

  • Resolution fixed deleted
  • Status changed from closed to reopened

Wow I almost missed the new feature:

http://alpha.bewelcome.org/blog

Under every post with a subtrip attached there will be a "map" button. While clicking it a map shows up.

Issues

  • it forwards while clicking 2 times "maps" to the start page
  • only grey box no map data
Last edited 6 years ago by crumbking (previous) (diff)

comment:13 Changed 6 years ago by crumbking

I suggest to remove this feature and add it later if needed. Let's get OSM out to the wild ;-)

comment:14 Changed 6 years ago by shevek

That's not a new feature it was always there. Switching to Google maps works fine.

comment:15 Changed 6 years ago by shevek

Two problems:

  • the cloudmade api key wasn't included in allblogs.php therefore the OSM map didn't show
  • the second time you clicked on the map link a javascript exception was thrown redirecting you to the front page.

Fixed both with commit 78659f5. Change status to fixed.

comment:16 Changed 6 years ago by shevek

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

comment:17 Changed 6 years ago by crumbking

great tested locally, works! Thanks :-)

comment:18 Changed 6 years ago by shevek

Tested on alpha.

Mapdisplay works now. Second problem still exists with Frefox 16.0.2.

comment:19 Changed 6 years ago by shevek

Updated fix (bbda8c0) to work on Firefox as well. Tested locally with Chrome, IE, Opera and Firefox.

comment:20 Changed 6 years ago by crumbking

  • Resolution fixed deleted
  • Status changed from closed to reopened

There is an small issue: Compare alpha and www:

On this blog post no geo information is attached so the map should not show up. But the container is not hidden on alpha. We might wanna simply hide this map div if there is no geo data.

Anyone an idea for a fix?

comment:21 follow-up: Changed 6 years ago by shevek

I don't see a map with neither Chrome nor Firefox. So what's the problem?

(I see that the text is wrapped while it doesn't need to be. But that's something I would fix after the release.)

comment:22 in reply to: ↑ 21 Changed 6 years ago by crumbking

Replying to shevek:

I don't see a map with neither Chrome nor Firefox. So what's the problem?

(I see that the text is wrapped while it doesn't need to be. But that's something I would fix after the release.)

Yes, the wrapped text is the problem. As it was working before OSM we should fix that. We do not want introduce new bugs with a release.

a really bad fix ;-) which seems to work locally:

--------------------- build/blog/templates/singlepost.php ---------------------
index cb04cff..ae97045 100644
@@ -92,2 +91,0 @@ if ($tags->numRows() > 0) {
-?>
-<div id="geonamesmap" class="float_right" style="width: 280px; height: 280px;" ></div>
@@ -95 +93,3 @@ if ($tags->numRows() > 0) {
-<?php
+    if (isset($blog->geonamesname) && $blog->geonamesname && isset($blog->geonamescountry) && $blog->geonamescountry) {
+        echo '<div id="geonamesmap" class="float_right" style="width: 280px; height: 280px;" ></div>'; 
+    }

Better ideas? Could someone test this?

comment:23 Changed 6 years ago by crumbking

I pushed it. Let's see if it works.

http://gitorious.org/bewelcome/rox/commit/a010b80e23764f4080827892585ba055a0621861

Just realised I fixed #1846 ,too. Sorry that I mixed this up.

comment:24 Changed 6 years ago by planetcruiser

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

deployed to alpha. looking good. thanks for the patch! also blog post that have a location are displayed properly: http://alpha.bewelcome.org/blog/planetcruiser/1179

Note: See TracTickets for help on using tickets.