Coder Social home page Coder Social logo

veggiekarte's People

Contributors

alesarrett avatar codedust avatar dependabot[bot] avatar kristjanesperanto avatar lens0021 avatar piratenpanda avatar tuukka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

veggiekarte's Issues

shouldn't show disused: restaurants

I noticed that veggiekarte shows restaurants that are tagged with disused:, e.g. node 9429821162 (Veggie Hut, disused:amenity=restaurant).

disused: items are hidden in most OSM viewers. It would be better to let OpenVegeMap uses the same behaviour.

Store and transfer places.json as gzip compressed

To significantly reduce the amount of data transferred and thus the time on slow network connections, places.json (12 MB) could be additionally written to disk as pre-compressed places.json.gz (1.7 MB). Apache could be configured to respond with places.json.gz and Content-Encoding: gzip when a request for places.json includes Accept-Encoding: gzip. This would require no changes in veggiemap.js as the browser would automatically uncompress the data.

I was able to configure my Apache for this with the following simple .htaccess file:

<Files "*.json.gz">
    AddEncoding gzip .gz
    ForceType application/json
</Files>

The uncompressed veggiemap.json should also be renamed as veggiemap.json.json so that Apache's MultiViews will do its trick.

This more explicit configuration setup seems like it could be even better but I haven't tested it: https://ma.ttias.be/pre-compress-content-apache-avoid-compressing-every-request/

HTML entities are not converted in the tooltips

Names with special characters are not displayed correctly in tooltips. In contrast, the characters appears correctly in the popup box. Here is a screenshot with a tooltip and a popup box:
picture_1

In this example the node 5593108867 has the name "Himmel & Erde". The Overpass API delivers instead of the & it's HTML entity &amp;.
<tag k="name" v="Himmel &amp; Erde"/>

I can not explain why the tooltip behaves differently than the popup box. But regardless, it makes more sense in my view to transform the HTML entity than to treat the different behavior.

Allow to open the map with customized filter

The map opens per default with all filters set. It would be great if the map can be opened so that it shows for example only vegan restaurants. One possible way may be to add a parameter to the URL like "?veganonly=yes&vegetarian=yes". This makes it possible to bookmark the page in the browser with such filter criteria.

The contact:facebook tag

The tag contact:facebook can contain the url of a locations Facebook page or the Facebook pagename.
https://wiki.openstreetmap.org/wiki/Key:contact:facebook

Currently the content of the contact:facebook tag is on veggiekarte shown as the Facebook page of a restaurant. If this tag only contains the pagename, https://www.facebook.com/ should be added in front of the pagename.

Example of restaurant where only the pagename is used: https://www.openstreetmap.org/node/10003018464

diet:vegetarian few

It would be nice if restaurants with the OSM tags 'diet:vegetarian few' and 'diet:vegetarian few (own menu chapter)' were added to the map.

Check finnish translation

The Finnish translation was just done automatically, it could be a little ugly. Would be great if someone takes a look. @tuukka , can you do that?

Icons not visible with dark mode on mobile

I was browsing the page this morning and noticed my Firefox was using some dark background on the menu icons and black icons for vegetarian friendly restaurants. Can we somehow disable dark mode switching or put proper icons?

No new data

The update of the data still does not work. It is probably the same cause as from issue #79.

Improve colors of icons and clustering

Different colors for different types of food would be great. E.g. something like:

  • blue for vegetarian:yes and vegan:yes, but not vegetarian:only or vegan:only
  • yellow for vegetarian:only, but not vegan:only
  • green for vegan:only

The color of the clustering should not match any of the used colors from above to prevent confusion.

Avoid overwriting the stat.json

With every update, the stat.json is overwritten with an older version during the upload process to the server. This is a pity as this file is updated every day and we lost a lot of statistical information.

How can we avoid that the stat.json is not overwritten during the upload process?

icon_transport_fuel_veggie

I'm playing a little with the code. When I'm execute the python script I get an object in the veganmap-data.js with an icon name "icon_transport_fuel_veggie". But this isn't in the veganmap-icons.js.

I can't find where you get the image files for the icons. Otherwise I would have create a pull request.

L.marker([39.91066, -76.7050208], {"title": "Rutter's Farm Store", icon: icon_transport_fuel_veggie}).bindPopup("<b>Rutter's Farm Store</b> <a href=\"http://openstreetmap.org/browse/node/5913090560\" target=\"_blank\">*</a><hr/>Leaders Heights Road 129<br/>website: <a href=\"https://www.rutters.com/\" target=\"_blank\">https://www.rutters.com/</a><br/><hr/>opening_hours: 24/7<br/>").addTo(markers);

Icons don't load

I moved the site to a different hoster so it will probable take ~24h for the DNS servers to migrate

sometimes `veggiemap-data.js` stays empty

I thought that I finally fixed the problem that the map sometimes stays empty. But today I saw again an empty map. At this time the veggiemap-data.js was empty again:

https://www.veggiekarte.de/js/veggiemap-data.js
// Created: 2019-03-31 17:00:001.349547
function veggiemap_populate(markers) {
}

30 minutes later the file wasn't empty anymore and the markers were back:

https://www.veggiekarte.de/js/veggiemap-data.js
// Created: 2019-03-31 18:00:01.651153
function veggiemap_populate(markers) {
  L.marker([51.4527522, -0.9489669], {"title": "Sprinkles Gelato" ...

I can not explain why that happens 😳

A workaround could be to check if the temporary file (veggiemap-data-temp.js) is bigger then 1 kB before replacing the veggiemap-data.js. But that wouldn't be a clean solution. Does someone have a better idea?

(But I'm glad that the timestamp already is a bit helpful 😊)

diet:vegetarian=yes not showing on the map?

I'm wondering if the map is getting updates? The thing being that while I do see places on the map in Latin America (South America to be more precise) and am hence assuming that the coverage of the map is global I am not seeing a restaurant that has had the diet:vegetarian=yes on it for 10 months now. See this POI https://www.openstreetmap.org/node/1933096524/history in http://www.veggiekarte.de/#17/12.09701/-86.23933 .

Any ideas why it's not showing on the map?

Thanks!

How to run map locally

Hi folks,
Thank you so much for providing and maintaining this map. Appreciated!

I am active in developing and maintaining the Der Gruene Kompass map.

https://greenwire.greenpeace.de/greenpeace-braunschweig/inhalt/der-gruene-kompass

http://umap.openstreetmap.fr/de/map/der-grune-kompass-braunschweig_93968#12/52.2641/10.5211

I am searching for a new back and front end for this map. This way I stumbled over veggiekarte.de.

I am studying veggiekarte now to learn how it is working and to decide, if it might be a candidate for a new front end of Der Gruene Kompass.

I did not find any information yet on how to run this map on my local development host. npm run start definitely does not suit this purpose. ;-)

I am also interested how to you update this map to the latest changes made in OSM.

I am appreciating any hints that brings light into darkness. ;-)

Cheers!

locations not showing on map

Using Debian + Firefox 45.9.0 (esr) and Fedora 53.0.2 the website is only displaying the world map but no vegetarian or vegan locations.

stat.json is sometimes empty

Since the query of the historical data sometimes doesn't work, we have to prevent the previous stat.json from being overwritten with an empty version. We already have something like that in the refresh.py in case we don't get proper data from OSM.

Have different filter options to select

It would be cool if one could filter on tags like diet:vegan=only and diet:vegetarian=only, and possibly on other information (e.g. café, bakery, restaurant, pub etc.).

GZIP compression by default

Can we enable GZIP compression by default?

Here is an article about the why and the how: https://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/

This is the recommendation from this article:

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

xml, xhtml and rss we don't need, I think.

But in our case, it would be good if JSON were also added:

AddOutputFilterByType DEFLATE application/json

If this is possible, we don't have to gzip the places file in the python script anymore 🙂

Lizenz

Hallo Benjamin, magst du eine Lizenz dem Projekt zuweisen?

Transmit the data as JSON?

To implement new features such as in #6, would you be willing to store and transmit the restaurant data in JSON format, and convert to HTML in the JS code in the browser?

refresh.py would output a JSON file veggiemap-data.json and veggiemap.js would fetch it and make the Leaflet calls that veggiemap-data.js currently does.

After this, all the data would be available in veggiemap.js to implement opening times, additional search features etc. Or do you see reasons why this would not be preferable?

Search works only once

If I search for multiple places, the results will always be those of the first search I made. Does it also happen to you?

Separate map from icon loading

Currently it looks like icon loading blocks loading of map tiles which makes the page look even slower. Can this be fixed somehow?

Other food issues

Hi all,

have you ever thought of including types of intolerances, such as gluten intolerance, in the map?

No new data since last PR

The map still contains the data from January 31st. This is the data from the last PR #78.

I can run the refresh.py successfully, so I think most likely it is because of the Python version on the server. Is it older than 3.4? Since version 3.4 pathlib is included in Python.

Can you see any error messages when you run it manually?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.