Problem incorporating PHP command (photo slideshow) into info window on map API
-
Any help gratefully appreciated.
Map page: https://samsplayground.com/map/
My Goal: To have a Flickr photo slideshow play in an info window on Google map (map api)
I’m using WordPress plugin “slickr-flickr” to create my slideshow
which utilises shortcode
I can’t use the exact shortcode I would use in my wordpress posts eg.
[slickr-flickr tag”example”]
because shortcode doesn’t work in the wordpress page template file
which my map api code is in.
NB/I’m not using a map api plugin, I’ve been making my own may based off code from https://econym.org.uk/gmap/The slideshow I want is playing fine under map with php echo code:
<?php echo do_shortcode(‘[slickr-flickr tag=”Seattle” type=”slideshow”
size=”small”]’); ?>But if I insert same code within map api info box the map will not
show.
eg.
var point = new GLatLng(46,-121);
var marker = createMarker(point,’Test’,'<?php echo
do_shortcode(‘[slickr-flickr tag=”Seattle” type=”slideshow”
size=”small”]’); ?>’)
map.addOverlay(marker);Presumably php cannot be inserted where html would normally go in this
manner, any suggestions?
I’m very novice with php and map api, just trying to get a map with my
travels on it. Please help.Can php be incorporated into text/javascript code as above?
- The topic ‘Problem incorporating PHP command (photo slideshow) into info window on map API’ is closed to new replies.