Contents
Login Register Wishes Forum About
Language Reference » Image Maps » initialiseImageMap
Help topics
Latest updates
2028d  replaceImageMapTitle
2028d  replaceImageMapValues
2028d  createFunctionSerie
2028d  setAbsicssaPosition
2028d  negateValues
Toolbox
  Download as PDF
  Print this page
  Share this page
  Create an account
  Feed the updates!
Google AdSense
initialiseImageMap - Initialise your image map

This function allows you to initialise your image map recording mode (session or file).

If you choose to save the imagemap on the server filesystem you must ensure that the web server have enough rights to create and delete files in the temporary folder given.

Calling this function
initialiseImageMap($Name="pChart",$StorageMode=IMAGE_MAP_STORAGE_SESSION,$UniqueID="imageMap",$StorageFolder="tmp")
Where :

Name is the name of your image map.
UniqueID is the unique ID of image map (will be used as the file name if recording on disk).
StorageFolder is the name of the temporary folder where will be stored the image map (if recording on disk).

The image map can be stored in two ways depending of the value given to the StorageMode parameter :

IMAGE_MAP_STORAGE_SESSION to store the coordinates in the user Session.
IMAGE_MAP_STORAGE_FILE to store the coordinates on the server disk.

Sample script

This will create a file named /tmp/BarChart.map to store the image map coordinates on the server.
 /* Library settings */
 define("CLASS_PATH", "../../../class");
 define("FONT_PATH", "../../../fonts");

 /* pChart library inclusions */
 include(CLASS_PATH."/pData.class.php");
 include(CLASS_PATH."/pDraw.class.php");
 include(CLASS_PATH."/pImage.class.php");

 /* Create the pChart object */
 $myPicture = new pImage(700,230,$MyData);

 /* Set the image map name */
 $myPicture->initialiseImageMap("ImageMapBarChart",IMAGE_MAP_STORAGE_FILE,"BarChart","/tmp");
Last updated on 08/04/2011 
by Jean-Damien 
Linked resources
  There is no linked topic yet.
Community comments
  No comments have been posted yet.
© Copyrights
Components used on this web site : Famfamfam icons has been made by Mark James, Rounded corners lite has been coded by Cameron Cooke and Tim Hutchison, SyntaxHighlighter has been written by Alex Gorbatchev. pChart and this web site have been created by Jean-Damien POGOLOTTI. This documentation contains 185 pages and 56 comments. 409 users have registered. This page has been rendered in 0,01 seconds. Wiki revision 1.37.