AvriHtmlMap
I was bored to draw all my html maps using photoshop in order to find more or less the good coordinate of my polys.
So I have created a small mooClass in order to draw the map directly on the image.
It's based on canvas & ofc mootools :)
Download AvriHtmlMap
Exemple :
Syntax :
(Here is the php code which create the image loaded)
<?php if (!isset($_FILES['image']) OR $_FILES['image']['error'] > 0) echo 'Select an image in order to draw the html maps :'; else if ($_FILES['image']['size'] > 5000*12000) echo 'Erreur lors de l\'envoi. <br />Le fichier selectionné est trop volumineux. <br />Réduisez sa taille (en utilisant Paint par exemple).'; else { $ext = strtolower(substr(strrchr($_FILES['image']['name'],'.'),1)); if (!in_array(strtolower($ext),array('png','gif','jpg','jpeg'))) echo 'Erreur lors de l\'envoi. <br />Extension incorrecte.'; else { $fp = fopen($_FILES['image']['tmp_name'], "r"); $content = fread($fp, filesize($_FILES['image']['tmp_name'])); echo '<img id="img" src="data:image/jpg;base64,'.base64_encode($content).'" />' ; fclose($fp); } } ?>