Opened 5 years ago

Last modified 5 years ago

#5113 new defect

Errors in installation instructions in YOURS wiki

Reported by: harold@… Owned by: lambertus
Priority: major Milestone:
Component: yours Version: 2.0
Keywords: Cc:

Description

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";

Change History (1)

comment:1 Changed 5 years ago by harold@…

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

Note: See TracTickets for help on using tickets.