Jump to content

Help with a project


zmbo_ouen

Recommended Posts

Hi there. Not done much on php. done a bit of mysql and some beginner stuff.

What I'm trying to do may be way out of my league but hopefully not and I'm a fast and eager learner :)

I'm going to Australia soon for a working holiday right and what I want to do is have a blog of course with updates but as well as that I want a map of Australia and I want to be able to tell people who check my website where I am in Australia currently (or the last place I was where I could update) by a pin or flag or something on a map of Australia. Obviously it needs to be dynamic so that when I move to the next town or city I can log in, then click on the map and the pin moves there and remembers it.

I take it I'd need a database to remember image co-ordinates to place the pin/flag. Also how would I allow the pin to be placed over the map of Australia (I'd preferable like to use an animated gif of a flag on a pole to pinpoint on the map where I am).

I would also need an admin page so obviously I'm the only one who can access this part of the website.

Any ideas as to what functions I may need to learn to be able to do this?

Many thanks for your time in reading this...
Link to comment
Share on other sites

Ok never mind... seem to have figured it out anyways.

The code to get coordinates posted from another page and create the new fallged image etc :

Header("Content-type: image/png");
$x = $_POST["x"];
$y = $_POST["y"] - 16;
$image = ImageCreateFromPNG("map.png");
$icon = ImageCreateFromPNG("flag.png");
$trans = ImageColorAt($icon,0,0);
ImageColorTransparent($icon,$trans);
$width = ImageSX($icon);
$height = ImageSY($icon);
ImageCopyResized($image,$icon,$x,$y,0,0,$width,$height,$width,$height);
ImagePNG($image,"Map/map.png");
ImageDestroy($image);

Thanks for reading this I guess lol
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.