I have an image of a map and would like to put points on it. How to do?
I have an image of a map and would like to put points on it. How to do?
If what you want is what is in the question, using PHP, one solution is to use the GD library for this, which usually comes pre-installed in PHP distributions.
See an example that draws a small red circle in a preexisting jpeg image:
meumapa.php
:
<?php
$im = imagecreatefromjpeg( 'meumapa.jpg' );
$cor = imagecolorallocate( $im, 255, 0, 0 );
imagefilledellipse( $im, 110, 135, 8, 8, $cor );
header('Content-Type: image/jpeg');
imagejpeg($im);
imagedestroy($im);
?>
Result:
ForthedrawingfunctionsavailableinGD,seetherelevantpartinthe manual / a> of PHP.