March 26, 2019 at 2:19 pm #48885
I’m working on public transportation website and currently using free version of your plugin. We are plannig to purchase pro version but before doing that I want to make sure if you have limitaitons for markers and polylines per map, and most important question is there any option that allows you to hide and show polylines(some sort of the button perhaps)?
Here is a link of another website: http://www.gspns.co.rs/mreza. We would like to make something similar with yout plugin.
Thank you for your time, George.March 27, 2019 at 9:33 am #48898
Thank you for getting in touch and thank you for your interest in our software!
Thank you for getting in touch, WP Google Maps and the Pro add-on has no limitations in terms of the number of markers or polylines per map.
We could give you custom code to show and hide *all* polylines. If you need to filter and search on polylines, I’m afraid we don’t support that at present. We do have experimental software which has not gone to release yet which does this, if you’re interested please open a ticket at https://www.wpgmaps.com/contact-us/ and ask to be put through to Perry.
I did take a look at the page at http://www.gspns.co.rs/mreza however their map appears to be broken at the moment.
I hope that helps?
– PerryMarch 27, 2019 at 11:59 am #48900
Thank you for your response Perry,
We would be really greatfull if you could send us the custom code to show and hide *all* polylines or even better if we could have button or checkbox for each polyline separately that triggers it on and off?
Once again thank you for your time. 😀March 27, 2019 at 5:00 pm #48904
That sounds great yes, we can do either with reasonable ease provided you’re happy to style your checkboxes / buttons.
Please can you get your map set up, and we’ll get back to you with the necessary code, as this can vary from site to site.
– PerryMarch 27, 2019 at 10:37 pm #48916
We have purchased Pro Add-on version, and we are very satisfied :).
I was wandering if there is an option that we can have a checkbox for every polyline and when the checkbox is checked polyline is showed on the map and when we uncheck that checkbox polyiline is removed. And also is there a possibility when triggering off and on a specific polyline also to show and hide markers that are on that specific polyline?
Thank you again for your time.March 28, 2019 at 8:55 am #48922
Unfortunately there is no way to link polylines and markers, if it’s essential that you have this then what you could do is set up a custom field to create a relationship between polylines and markers, then mirror custom field filtering from your custom polyline filtering. You would need to add a “Polyline” custom field, then for each marker along a given polyline, set the value of that custom field to the polyline ID.
If that sounds a bit intimidating, please may we ask that you get your polylines and markers set up, then share access to the map page URL, and your admin dashboard, by opening a ticket at https://www.wpgmaps.com/contact-us/ with this forum thread as a reference, we’ll set up an example and give you the filtering code.
I hope that helps?
– PerryMarch 28, 2019 at 12:41 pm #48925This reply has been marked as private.March 28, 2019 at 2:57 pm #48929
Please open the attached file and copy the contents, then paste that in to Maps -> Settings -> Advanced in Custom JS.
This code will add checkboxes to allow you to toggle the routes on and off.
If you would like this to work with your markers as well, we will need to you to add a Custom Field with a name of your choice, and then for each marker on your map, put the ID of the corresponding polyline in that custom field.
Once you have done so please let us know and we will amend this code to toggle the markers on and off by the polyline ID stored in your Custom Field.
Please note that we do not officially support this – as such you will have to style this
I hope that helps?
– PerryMarch 28, 2019 at 2:59 pm #48930
For some reason my previous attachment failed, please see here
– PerryMarch 28, 2019 at 4:10 pm #48932
Thank for the code,
We have imported custom JS provided and we are experiencing an issue please see the picture attached
Attachments:You must be logged in to view attached files.March 28, 2019 at 4:47 pm #48939
I see, thank you.
It appears the JS has been escaped twice for some reason, we will look into this as soon as possible.
In the mean time we have installed “Simple Custom CSS & JS” and added that custom code there, and can confirm it’s working.
Please be advised that your earlier post was not set to private and as such your credentials were briefly exposed. I’ve set this to private now but we strongly implore you to change those details.
I hope that helps,
– PerryMarch 28, 2019 at 5:48 pm #48953
Hi, everything seems to be working 😀
But we were wondering if the lines could toggled off by default and when checked to be turned on?
Thank again so muchMarch 28, 2019 at 7:05 pm #48959
We have added custom field polyline but some markers are on more than one line, is it possible to add more line id’s to one marker?
Attachments:You must be logged in to view attached files.March 28, 2019 at 10:17 pm #48963
And also polylines are going through terrain instead following the street. Is there any chance to set that without adding extra coordinates besides existing ones?
Once again thank you for your time and helping us.March 29, 2019 at 9:41 am #48967
We have altered that code so that the polylines are hidden by default, until the corresponding checkbox is clicked.
Regarding your second question, yes, we can adjust the custom code for that, please enter each polyline ID separated by a comma, eg 11,22,33
Unfortunately, snapping the polyline to the nearest road is not something we would be able to undertake in the scope of a support ticket. You would have to adjust them manually using 3rd party software, or you could look into the Google Roads API to snap to the nearest road. Unfortunately this is not a trivial task. We could potentially take that on for a customisation quote if you’re happy to wait, or you would need to work with a 3rd party developer on that.
I hope that helps?
You must be logged in to reply to this topic.