March 2, 2019 at 3:47 pm #48292
Last year our map allowed users to add sightings of moths and caterpillars so that others could tell when they were in their area and we are going to do the same again this year. I want to be able to show last years data on the map which had three categories, I want to show these as 2018 category data in a different colour to the 2019 categories.
How do I do this, if I create the same three categories but labelled 2019 the users would still be able to select the original categories, what I think is needed is the ability to restrict which categories users are allowed to pick when submitting a marker, whilst still being able to show all the categories on the map.
Does this make sense and is it something that could be added?
Over 500 markers submitted and data now being used to help as part of a paper to be published on the spread of Box Tree Moth across the UK.
March 3, 2019 at 12:47 pm #48301PerryModerator
- This topic was modified 10 months, 3 weeks ago by poolec.
I hope this finds you well!
We don’t record when the marker was created so you would need to use categories or similar.
What I’d recommend you do is hide the “year” categories completely using CSS, then use jQuery to check the current year. Obviously, this won’t be 100% secure as a would be vandal could use the inspector to get around this, I’m not sure if that would be secure enough for your purposes, but if that would work for you and you need help setting that up, we can provide the code.
Does that help?
– PerryMarch 4, 2019 at 7:57 pm #48330
I would need help with that as I can muddle by with basic CSS, but not much more!
For the long term it might be something to add to the categories settings in the back end – a tick box against each category “Selectable in VGM” rather than as at present where all categories are either on or off. Should I post this in the feature request thread?
ChrisMarch 5, 2019 at 8:56 am #48355[email protected]Member
Thanks for the response and confirmation.
I would be more than happy to help with this and add this code for you to achieve this.
Would you perhaps be open to creating a ticket here – https://www.wpgmaps.com/contact-us/ – so that I can contact you to help you achieve this as soon as possible?
Regarding your suggestion about adding a ‘Selectable in VGM’ checkbox, this is a great idea and I will add it as a suggestion to the feature list, thanks for your feedback.
I am looking forward to hearing back from you and assisting you further.March 8, 2019 at 4:02 pm #48472
Having played around with things I’ve made it work with no CSS required – here’s how.
Duplicated the map and called labelled it for 2019
Added three more categories for 2019 sightings and set them to work with the new map
Changed the old category icons to smaller transparent dots and made them unavailable on the new map (I thought this would mean that the data wasn’t shown as well, but it is).
Doing this means the old data is visible on the new map having duplicated the map and the new categories are only selectable in the VGM area – which is exactly what I needed.
The live map ready for users to add their moth and caterpillar sightings can be seen here:
March 11, 2019 at 7:04 am #48491[email protected]Member
- This reply was modified 10 months, 3 weeks ago by poolec.
Thanks for letting me know and I am really glad to hear that you were able to get it resolved and found a solution and your map is looking great.
Just to confirm is everything working correctly now?
Thanks for your time.
- You must be logged in to reply to this topic.