Locations Plugin


(Angus McLeod) #121

The list is meant to be different from the ‘dropdown’ list of the other search type. What you’re seeing is a style issue; fixed now: Fix input field css · angusmcleod/discourse-locations@be06265 · GitHub

The zoom you actually want is the “map marker zoom”. It overrides the “map zoom” when there is a marker present. Likewise with the expanded zoom. Also the maximum zoom level is 19. Entering anything above that will have no effect.

For example, I just changed the map marker zoom to ‘2’ on my sandbox and it now shows mini-maps with markers at zoom level 2 (see e.g.).

I can see why it’s confusing though. I need to flesh out the role of each setting here some more and give more details. Also there may be an actual bug with the expanded zoom. I’ll do this a bit later today.


#122

Thanks for the fix on expanded view + list style, and clarification around the map marker zoom. You hit the nail on the head, map marker zoom was exactly what I should have modified!

What are your thoughts on moving the “Show Map” button to the left side of the address for responsive design and let the address trail? Sometimes the address is a bit long and often the map gets pushed off of the page (when you expand the small map anyway, especially on mobile):

Excellent plugin.


(Angus McLeod) #123

Yes, long addresses are an issue. I think the tweak to be made here for now is just to add a max-width.

Add max width to location-label · angusmcleod/discourse-locations@e20d332 · GitHub

On mobile it seems fine:


(Angus McLeod) #124

As scheduled, I have removed Mapzen as a geocoding provider. See further. Commit.

  • If your provider is still set to Mapzen it will automatically be set to Nominatim if the app is rebuilt.

  • If a geocoding request is made with Mapzen, the provider will automatically be changed to Nominatim.


(Jeremie Leroy) #125

Hello All,
Hi @angus, I installed the 2 plugins, event and location, but the map doesn’t asnwer as expected : Sortir - Events - Français à Londres


I think that i’m missing another plugin to install, could you tell me which one ?

I also noticed that when an event is pinned it does appear in the date order of the categorie, is there a way to make it above all ?

Many thanks, and congrats for the nices plugins and the supports

Best,


(Angus McLeod) #126

Could you PM me the logs at https://francais-a-londres.org/logs? Thanks.


#127

Nay. Thanks for the pointer!


#128

Angus, we want to map all our restaurant-related discussions prior to the plugin getting installed, but we are looking at a pretty large number to manually enter into each discussions. So I am thinking about potentially using the Yelp API to get us all the restaurant name, their address, and the long/ lat info, etc. so we can update the underlying psql tables more quickly.

Do you think its feasible that we do a SQL update of the database tables that store the location mapping? If possible, I am guessing we’d have to update:

  • Topic table to show which topic has mapping
  • Mapping table on the entered street address, long/ lat (if that’s how’s its stored).

If possible, we can probably create a master location table from Yelp, and then do a simple and quick manual mapping of each restaurant discussion we have to the Yelp restaurant index and grab the relevant info automatically with e.g. excel., and finally update the relevant psql tables in Discourse.


#129

This is a great idea @8BIT

@angus is this on the roadmap? My users have requested this functionality and for me it would be higher priority than location-per-topic support.

Map could be accessible from the burger menu’s ‘User’ entry (domain.com/u) which is currently a table but you could have a pop-up on there to present a map? or add a separate ‘User Map’ entry to the burger menu to a new page?

Sure. If users could manually (re)pin their location on a map (say in domain.com/user/preferences/profile) they could put in an approximate one (e.g. middle of their city) and avoid privacy issues?

Thanks for all the work!


(Angus McLeod) #130

Yes, this feature is in the planning stages atm actually :slight_smile: I’ll keep you up to date on it.


(Tobias Eigen) #132

Had some fun catching up on this long topic. Nice job, Angus, on providing a great plugin and incorportating lots of feedback.

I don’t see any issue here - can you explain your thinking? Seems to me the options menu can be context sensitive and also reflect permissions of the user, unless there is something I don’t know about how the options menu works. I also think it’s a positive for location (and events) options to not be quite so visible because they are not always needed and staff can always add them in later. Burying them is also a handy way to MVP these features.

I get this. But also don’t see any particular UI problem with associating location and events options with the OP.


Events Plugin :calendar:
#133

Hi @Angus, I found that you can modify a location, but you can’t delete a location. FYI


(Angus McLeod) #134

Thanks for the report. Fixed:


(Angus McLeod) #135

@tobiaseigen Sorry for the slow reply!

I’m not averse to making ‘Add Location’ a post toolbar option as a site setting. If you’re still keen on it, I’ll take a look at it. Personally, I think it doesn’t make sense though.

If the ‘Add Location’ button were in the options menu or anywhere in the composer editor button bar it would be

  1. The only context-dependent control.

  2. The only control not related to the content in the composer editor.

All the other controls related to markup in the composer editor and are concerned with the content of the first post.

The Add Locations control adds custom fields to a topic and is not associated with the first post of the topic. It is more akin to the category chooser or the tag chooser: both also relate to topic fields and have their own seperate inputs.

A category in which locations and events are enabled are typically categories dedicated to location and event specific topics, such as meetups for a particular community. Within that particular context I think it would be odd to hide the controls concerning the event time/date and location by default.

Adding locations and time/date is an expected action when creating the first post in such a context. If you’re creating a topic in a category specifically about locations, but don’t add a location in the first post why are you creating a topic?

I can see where you’re coming from here, but I think this would be changing the ‘product’ for the wrong reasons. I reckon the way to roll out Locations and or Events would be:

  1. Test them out in a staging environment (this should be done with any plugin).

  2. Create a dedicated category with restricted permissions and test them amongst staff.

  3. Decrease the required trust level to access and / or post in the category to your preferred level in a timeline that suits.


#136

Angus, Is it possible to enter the lat long directly, either via the UI or directly into the database? The need arises from mapping locations where entering street names often result yield no results (e.g. developing countries).


#137

@ckshen This might answer your question if I’m understanding it correctly. If not, I’m sure @angus will chime in.


(Angus McLeod) #138

Yup, you can enter lat/lon directly via the api or via the location form input fields. By the sound of it, you probably want the api.


(Hamza Ahmed) #139

I am getting error when loading maps from map menu.


(Angus McLeod) #140

Please pm me your logs (at https://yoursite.com/logs)


(Alex Salvador) #141

Very excited about this plugin, thanks Angus !

I was wondering if it was possible to filter topics appearing on the map using the search tool.
Another way to phrase it : I can search using key words in the category where the locations plugin is enabled, which will display a list of topics. Is there a way to have these results (and only these) displayed on a map ?

This would be greatly useful in our case : visualize the location of colleagues whose description match certain characteristics.

More generally, it would be very useful to be able to hit a “map” button not only in the main category view, but also in other situations, for instance within the “Unread” / “New” / “Top” views…