mosmap temporary file

This forum is for general questions about extensions for Joomla! 2.5.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
diasf
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Wed Nov 27, 2013 10:06 am

mosmap temporary file

Post by diasf » Sun Apr 15, 2018 2:58 pm

Hello

Can anyone please help me with mosmap?

I tried to create a dynamic file to show with mosmap extension. Everything works well. Well, almost... It creates a temp file like this:

$filename = tempnam('/home/visitarp/public_html/images/.../kmlfiles', "kml").'.kml';
$filename_mm = str_replace('/home/visitarp/public_html','',$filename);

$coord_text = '<?xml version="1.0" encoding="UTF-8"?>';
$coord_text .= chr(13).chr(10).'<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">';
$coord_text .= chr(13).chr(10).'<Document><name>'.$filename.'</name><Folder><name>'.$title.'</name><open>1</open>';

$coord_text .= chr(13).chr(10).'<Placemark>';
$coord_text .= chr(13).chr(10).'<name>Title</name>';
.....
$coord_text .= chr(13).chr(10).'<Point><coordinates>(coordw),(coordn),0</coordinates></Point>';
$coord_text .= chr(13).chr(10).'</Placemark>';

....(More placemarks)...

$coord_text .= chr(13).chr(10).'</Folder></Document>';
$coord_text .= chr(13).chr(10).'</kml>';
$file = fopen($filename, "w");
fwrite($file,$coord_text);
fclose($file);
$f = fopen($filename, "r");
fclose($f);
?>
{mosmap kml='<?php echo $filename_mm; ?>'| kmlrenderer='geoxml'| kmlsidebar='mapalegenda'| kmlsbwidth='200'| dir='1'| kmllinkablemarkers='1'|mapprint='none'| kmllinktarget='_blank'|geoloc='1'|maxcluster='3'| gridsize='10'| minmarkerscluster='3'| maxlinesinfocluster='5'}
<?php
unlink($filename);


Everything wors ok showing the map. However, if the "unlink" instruction is there, the map is not shown. If it is not there, the temp file is not deleted.

It creates 2 files, named something like "kmle3cZOI" and "kmle3cZOI.kml". The files stay there after everything done and I have to delete them by FTP.

I've tried to contact mosmap author, but it seems he has disappeared from Earth, as his website did.

Any help? Thank you.

Fernando

diasf
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Wed Nov 27, 2013 10:06 am

Re: mosmap temporary file

Post by diasf » Mon Apr 16, 2018 6:33 pm

Nobody? No answer at all? :(

User avatar
mandville
Joomla! Master
Joomla! Master
Posts: 15152
Joined: Mon Mar 20, 2006 1:56 am
Location: The Girly Side of Joomla in Sussex

Re: mosmap temporary file

Post by mandville » Mon Apr 16, 2018 9:12 pm

considering most people would have dumped mosmap by now as per https://extensions.joomla.org/extension ... by-reumer/
and your joomla is out of date then you'll only get, - updated, find another solution but they wont want to upset you by telling you the obvious.
HU2HY- Poor questions = Poor answer
Un requested Help PM's will be reported, added to the foe list and possibly just deleted
{VEL Team Leader}{TM Auditor }{ Showcase & Security forums Moderator}

diasf
Joomla! Apprentice
Joomla! Apprentice
Posts: 45
Joined: Wed Nov 27, 2013 10:06 am

Re: mosmap temporary file

Post by diasf » Tue Apr 17, 2018 8:05 am

OK. :( Sorry...


Locked

Return to “Extensions for Joomla! 2.5”