map not displaying when using the info windowBrowser Info Environment
Love this block! Works great!
Except from the update with the api key on, the blocks do not display when using the info window option. If i leave this empty the block does display well.
Is this a bug? Is there something i can do to make it work with some quick fix?
Sorry for this. I just copied an google maps route link, i guess that was the dealbreaker. I looked up a fresh route in googlemaps and created a new link in the info window.
Love your add-on, keep up the good works!
There does appear to be a bug:
I have two maps on the same page with different addresses. Each of the have a link to a google route like this:
<p><a href="https://www.google.nl/maps/dir//adress-of-the client-here/" target="_blank">Anfahrt</a> </p>
Now just one of the blocks displays.
It seems the <p> tags are causing the issue.
I added the code you supplied to a test map and it did not display at all, but I did manage to fix it, so hopefully the below fixes work for you too.
I was able to fix this issue by opening up the HTML edit option ( </> ) in the info window tab and pasting only the link itself, (no <p> tags)
<a href="https://www.google.nl/maps/dir//adress-of-the client-here/" target="_blank">Anfahrt</a>
Alternatively, I was able to successfully add the link via the editors 'link' button and create the link that way.
Hope this helps.
If you try the above and still have issues, please let me know and I'll investigate further.
I have been looking into this a bit more closely and there is definitely a weird issue occurring where the content editor is pushing <p> tags on a new line whenever an existing Info window is edited in the WYSIWYG editor.
eg: <p>This is some text. <a href="www.alink.com">Click me</a>
(I also noticed that this is happening on the original code example you posted)
This 'line break' is causing an issue with the Google map rendering on screen.
The 'line break' seems to be inserted before the end of every <p> tag whenever existing Info window content is updated.
For now it seems, I am able to get the desired result by adding all the Info window content and links (via the link icon in the tool bar) in one go.
Making changes in the editor after it has saved seems to be causing the issue.
At this stage, this is just a quick fix and I will need to investigate this further and come up with a solution to correct the offending changes made by the editor.
Updating to v1.2.1 should fix this issue.
Thank you for bringing this to my attention and also thank you for your review :)
Any other issues, please let me know.
Cheers for the excellent support!
Take it easy.