How to use a placeholder to show a KML file from the database using a different Google Maps plugin

hdmann

New Member
I want to be able to load a google map with a KML file when viewing a record. I've tried putting the following in a display element, and also a field element and disabling the element but neither seem to work.

{mosmap kml='http://www.walking.rocks/(Trail_Segments___kml}'| overview='1'}

If I hard code the file name it shows up in both instances, but with the field element it repeats itself and spits out a bunch of random code in bits and pieces all over the place.

Any pointers in the right direction would be most appreciated.
 
Come to think of it - ideally in the form it would show the upload, on the list the filename, and then when viewing it the google map. Asking too much?
 
Code:
{mosmap kml='http://www.walking.rocks/(Trail_Segments___kml}'| overview='1'}

This code doesn't look right you have an open bracket, it should be a squiggly! { you also have an incomplete quote '


If it doesn't work after your corrections try doing it as EVAL on the display element and doing something like.

Code:
$map = '{Trail_Segments___kml}';
return "{mosmap kml='http://www.walking.rocks/" . $map . "| overview='1'}";

If that still doesn't work then try exactly the same in a calc element.

If that till doesn't work I'll have a look, probably best to unpublish your Fabrik element though as the javascript may conflict with mosmaps.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top