Patrick Brosi 4 years ago
parent
commit
671536d0aa
2 changed files with 4 additions and 1 deletions
  1. 3 0
      src/osmfixer/index/StatIdx.cpp
  2. 1 1
      src/osmfixer/server/StatServer.cpp

+ 3 - 0
src/osmfixer/index/StatIdx.cpp

@@ -469,6 +469,9 @@ void StatIdx::initSuggestions() {
469
           sug.target_gid = stat.group;
469
           sug.target_gid = stat.group;
470
           sug.target_osm_rel_id = getGroup(stat.group)->osmid;
470
           sug.target_osm_rel_id = getGroup(stat.group)->osmid;
471
 
471
 
472
+          auto b = util::geo::centroid(getGroup(stat.group)->poly);
473
+          sug.arrow = getGroupArrow(i, b);
474
+
472
           _suggestions.push_back(sug);
475
           _suggestions.push_back(sug);
473
           stat.suggestions.push_back(_suggestions.size() - 1);
476
           stat.suggestions.push_back(_suggestions.size() - 1);
474
         } else {
477
         } else {

+ 1 - 1
src/osmfixer/server/StatServer.cpp

@@ -166,7 +166,7 @@ util::http::Answer StatServer::handleMapReq(const Params& pars) const {
166
   auto gret = _idx->getGroups(bbox);
166
   auto gret = _idx->getGroups(bbox);
167
   sep = ' ';
167
   sep = ' ';
168
   for (auto group : gret) {
168
   for (auto group : gret) {
169
-    if (group->polyStations.size() == 1) continue;
169
+    if (group->polyStations.size() == 1 && group->osmid < 2) continue;
170
     json << sep;
170
     json << sep;
171
     sep = ',';
171
     sep = ',';
172
     printGroup(group, &json);
172
     printGroup(group, &json);