Ratel geo for production (kind of)

Hello Everyone. I have acquainted with the dgraph database, and it was fantastic. I wanted to use the features related to geolocation to show my clients my business coverage. So essentially, the image contains some OSM tiles with some polygons marked in them. One question I have in mind is how does ratel generate the geo tiles (the geo tab in the menu). Would someone please share the source code in case nobody documented this?

I believe it uses leaflet, at least that is what I am using. It has a ton of features and plugins for all sorts of things you may want/need.

2 Likes

Yes, it is https://react-leaflet.js.org/

1 Like

Thanks a lot for the reply I really appreciate it. I just noticed that in the geo tab the latitude and the longitude variables are switched. I put the locations in leaflet.js in order that the dgraph provided and the maps are messed up, so I switch those and it worked. It was a minor inconvenience, but I would appreciate if somebody switched it to be in order.

That’s a standard in the lib used in the core code.

Ping @dmai @hardik

Dgraph uses the geojson standard format for geo data, which has points formatted as [longitude, latitude]. With geojson data being a standard format, the order won’t be changed.