In my project site I am merging a base image (a map) with markers (the same marker always but repeated) according to a table in MySQL using the php function imagecopymerge.
I want to migrate this to jQuery since the refreshing of the image flicks, which is very ugly.
Could you please guide me to the best solution?
Thanks a lot.
Am I right in thinking you have a static image which gets updated via user interaction? The updates get handled on the server and a new “merged” image is sent back to the client?
If that’s the case, you may be able to replace it all with a fair bit of jquery. There’ll be differences though.
I’d use the following strategy:
I’m happy to give more detailed suggestions if you can tell me exactly what you need to be able to do.
Update
Ok, so based on your comment, I understand that there’s a database table that dictates the contents of the map. It’s not necessarily updated by the current user, but you frequently check for changes.
You’re already using ajax to do most of the work, so changing to jquery wouldn’t do too much. I think maybe you just need to think of a new way to handle the display of the new image.
You could try a double-buffering technique by having two images in the same place in the page, only one of which is properly visible at any time.
If done properly, the effect could be more like a smooth update of the map rather than a flicker.