jhunter626 Posted December 11, 2009 Share Posted December 11, 2009 I really did not know how to phrase the subject line accurately. I have a jpg image that shows a map of part of my state. What I am trying to do is place a "ring" that is 35 miles in diameter from certain cities on this map and have the ability to change the color of these rings as needed. Instead of creating a new map each time a "ring" color would change I was hoping that PHP would be able to handle this for me so all I would need to do is change the ring color via PHP code as opposed to manually creating a new map each time. It should be noted that some of the rings may overlap some of the other rings. I mention this in advance since it may change the outcome of any potential answers should this be possible to do in PHP. I have attached a copy of my "base" image to help give you an idea of what I am trying to do. Thanks in advance for any help you could provide. Jess [attachment deleted by admin] Link to comment https://forums.phpfreaks.com/topic/184777-image-manipulation-on-a-map/ Share on other sites More sharing options...
cags Posted December 11, 2009 Share Posted December 11, 2009 Alot would depend on how you are storing co-ordinates and hence calculating where the image should be drawn etc. You could use imagecreatefromjpeg (or one of it's siblings for gif, png etc.). You can use imagecolorallocate to 'select' the colour you wish the circle to be, you can then use imageelipse to draw the circles. Personally I'd probably store an array of objects (or arrays) for each circle. This would store circle size, circle start co-ordinates, circle colour. You can then loop through the array drawing all images before displaying the image to the user. Finally use imagejpeg (or a sibling again of course) to draw the image out to the browser (after setting relevant headers). Link to comment https://forums.phpfreaks.com/topic/184777-image-manipulation-on-a-map/#findComment-975488 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.