Multiple maps on one page?
-
I have two business locations so would like two maps on my page, but I can only get one to show up. Is there away to have more than one?
Thanks.
-
I didn’t really make it clear that I actually want two separate maps rather than one map with two markers (I know this is a function in the KML version).
Thanks
G’day jotravers,
You can have as many maps on the page as you like. If you’re having trouble with a map page, please post a link; I can’t diagnose what I can’t see.
cheers,
RossThanks for the reply Ross. The link is http://theharleystreetnutritionist.co.uk/clinic-consultations/
First map shows up, second map is blank. I’m a beginner at this so probably something obvious!
Jo
G’day Jo,
You may have another map plugin that is also loading the Google Maps API scripts, or your theme is doing that. It’s doing it with an invalid version number too (4.2.2, the WordPress version, not the Google Maps API version) and loading it over https, whereas Flexible Map is loading v3.19 over http when the page’s protocol is http. You can see this from the error message Google Maps is logging to the browser’s console:
You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
Either disable one of the plugins, or tell me which the other plugin is so that I can find a solution for you. If it’s your theme, perhaps you can ask the theme developer for assistance.
cheers,
RossHi Ross,
I did have another google maps plug in which I have deleted but it doesn’t seem to have made a difference.
A really weird thing is that it’s the second map coordinates that show in the first map.
Perhaps it is the theme.
Jo
Try switching your theme to twentyfifteen to see if the maps work. If they do, then yes, it’s the theme.
cheers,
RossI’ve tried it in the live preview of twentyfifteen and the problem’s still there. Any ideas?
Please post your exact supervised here so that I can test them.
Sorry, what would you like me to post?
Bloody autocorrect! Shortcodes;)
I’m off to bed now, will look at it tomorrow sometime from a real computer, not an iFail.
Cheers,
RossAh, autocorrect!
This is the code I’m using on the page:
[box color=black] <h2>The Harley Street Nutritionist Clinic, Harley Street</h2> <table> <tr> <td>1-7 Harley Street (Thursdays) London W1G 9QD</td> <td>[wpi_designer_button id=241]</td> </tr> </table> [flexiblemap address="1-7 Harley Street london England w1g 9qd" title="The Harley Street Nutritionist" align="center" directions="true" id="The_Harley_Street_Nutritionist" width="100%" height="200px"] <table> <tr> <h2>The Harley Street Nutritionist Clinic, Clerkenwell</h2> <td>45 Central Street (Mondays) London EC1V 8AB</td> <td>[wpi_designer_button id=241]</td> </tr> </table> [flexiblemap address="45 Central Street london England EC1V 8AB" title="The Harley Street Nutritionist, Clerkenwell" align="center" directions="true" id="The_Harley_Street_Nutritionist" width="100%" height="200px"]Sleep well!
G’day Jo,
Right, I missed this when viewing the page source, but it’s plain as day looking at the shortcodes. You have the same ID on both shortcodes, which leads to the same ID on the containing divs and the maps being drawn in one div only. IDs must be unique, so change the second map’s ID to something else — e.g.
The_Harley_Street_Nutritionist_2cheers,
RossHooray! Thanks Ross, much appreciated. It’s all working beautifully now.
The topic ‘Multiple maps on one page?’ is closed to new replies.