Closed ddrury closed 4 years ago
A suggestion: I'm updating and completing an openstreetmaps module and would like to use some of the select2 functions, however, select2:flagValue & select2:flagSearch both have hard coded file paths containing 'googlemap'. Would it be an idea to move the places folder out of the module folder to (for example) the data folder?
I'm planning to remove select2. It doesn't work with assistive technology such as screen readers. There is an open issue for this. The most-usable alternative (chosen) doesn't have native support for server-side data, so it's not a simple replacement. Also, it doesn't allow HTML formatting in the options.
Would it be an idea to move the places folder out of the module folder to (for example) the data folder?
The data folder is not publicly accessible. Therefore you can't put public assets (e.g. flags) here.
People don't want the hassle of maintaining a local flag/location database.
There is a lot of data, and we cant include it in the distributions.
A solution is to put it all in a public/shared CDN. e.g. something based on https://github.com/webtrees/geodata
That sounds like a good idea and ultimately it could replace the placelocation table. As I'm currently obtaining the map data from an ajax call in geojson format it would be simple(ish) to obtain the data from a different geojson source.
should not have anything beyond 'googlemap' in the path (this is held in the pl_icon field in the placelocation table
Can you give an example of the value in the pl_icon
field.
Are you able to check if 1.7 and 2.0 both generate the same values in this field?
1.7 entries
places/flags/AUS.png places/AUS/flags/NSW.png
These entries stay the same after an upgrade to v2, however by going to the edit page, deleting the current entry (important) then doing a search the file is found without the path for the top level only, I don't seem to be able to navigate to lower levels in the hierarchy.
I think that the new code assumes a simpler structure for these values. (my mistake....)
It's no wonder that users have trouble with it - I was looking at the code and couldn't work it out ;-)
I was looking at the code and couldn't work it out Tell me about it! I'm trying to duplicate the admin functions for openstreetmaps and I can't figure that out either.
A couple of notes/comments:
I could build a hierarchical collection if anyone wants.
Yes please! Have you seen https://github.com/webtrees/geodata
No, and having looked at it I am intrigued but see nothing related to documentation/man pages/cli help, so am just poking at it to see if twitches.
Presumably, a flag at a third level would be
places/ABC/DEF/flags/GHI.png
Presumably, a flag at a third level would be
I've been given a folder of some Texas flags and the structure is places/USA/TX/flags/xyz.png. so that agrees with your supposition - I can't see any need to go deeper than that (but I bet someone will!)
My test data using Norway is Norway/Østfold/Hvaler whose administrative center is the village Skjærhalde, but I have not found the village's mark...
This issue is fixed in 2.0.0, which is now released.
Module administration - Google Maps - Geographic data - place edit screen.
For the Flag field, I think the dropdown select box should display any currently selected flag as well as the text, however, the
<img src = '...
line is found in the title attribute of a span which is part of the select2 structure.Later: Function Select2:: function flagValue should not have anything beyond 'googlemap' in the path (this is held in the pl_icon field in the placelocation table, therefore the function should be
however, the problem with a title attribute also containing the <img ... content remains