Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Errors in installation instructions in YOURS wiki #5113

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments
Closed

Errors in installation instructions in YOURS wiki #5113

openstreetmap-trac opened this issue Jul 23, 2021 · 2 comments

Comments

@openstreetmap-trac
Copy link

Reporter: harold[at]il.ibm.com
[Submitted to the original trac issue database at 10.22am, Wednesday, 5th February 2014]

Just installed YOURS from svn (revision 30261).
Tried to get it going but found the instructions had some problems:

  • really everything should be installed in one directory. The instructions say to install YOURS from svn in the public html directory. I created a VM in our cloud and did this in /var/www/yours. In gosmore.php it is expected that gosmore is at /var/www/yours/normal/gosmore and also at /var/www/yours/gosmore. Also the gosmore .pak file must be at /var/www/yours/america.pak (and eurasia.pak)

  • the website's yours.js uses the 'dev' api, and that looks for route.php but on the filesystem there is only gosmore.php

  • one other I needed to fix the GeoJSON output of the 1.0 api:

===================================================================
--- api/1.0/gosmore.php (revision 30261)
+++ api/1.0/gosmore.php (working copy)
@@ -342,8 +343,15 @
        $geoJSON .= "  },\n";
        $geoJSON .= "  \"coordinates\":\n";
        $geoJSON .= "  [\n";
+
+       $i = 0;
+       $n = count($elements);
        foreach($elements as $element) {
-               $geoJSON .= "    [".$element["lon"].", ".$element["lat"]."],\n";
+               if (++$i == $n) {
+                       $geoJSON .= "    [".$element["lon"].", ".$element["lat"]."]\n";
+               } else {
+                       $geoJSON .= "    [".$element["lon"].", ".$element["lat"]."],\n";
+               }
        }
        $geoJSON .= "  ],";
        $geoJSON .= "  \"properties\": {\n";

@openstreetmap-trac
Copy link
Author

Author: harold[at]il.ibm.com
[Added to the original trac issue at 7.07am, Thursday, 6th February 2014]

I forgot to mention that there are certain styles.xml files that are required. It would be helpful to add them to the repo:

cyclstyles.xml
elemstyles.xml
genericstyles.xml

@openstreetmap-trac
Copy link
Author

Author: mmd
[Added to the original trac issue at 6.44pm, Tuesday, 19th May 2020]

YOURS project is no longer active, closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant