thom a écrit :
> First merci beaucoup
answering me so fast and so right!
> the given links are the kind of things i'm wishing to do.
> (http://perso.wanadoo.fr/stephane.moriaux/truc/suisse/)
>
> i'm gonna try to let user make multiple selections
> on the picture, then generate the corresponding map.
This example was basically to get several areas cooordinates
and was a little simplified to one area (in order to go to a new page
with this area taller re-sized (suite en devenir ...) )
Instead to begin a new fresh selection you just need :
- to validate the onwork selection
- to begin a new one while keeping the old one.
Validations could be stocked in an array.
> a similar script (based on the given one in my
> first post) doesn't work properly in all browsers when
> adding the selection rectangle funcs (especially Mac's safari
> if i remember right).
if it works on 1st point it would have to work with 2nd point.
I would do something like that :
- image to map
- a hidden div with border and transparent background-image
with a onclick function to select this div
- a lasso function similar that I have on given example
on 1st click : 1st point and stock in a variable
on 2nd click or double-click : 2nd point stocked
then :
- cloning hidden div above
- giving it correct size and place (from stock)
- giving it an id and visibility
- eventualy to give it a title or/and a link in accordance
- perhaps to stock all necessary in an array
- when clicking on this new div : function to re-arrange it ?
- a button to validate the complete map
to create html code of all this clones
(using a loop on collection of this clones
with result in a textarea to afterward copy its content)
--
Stephane Moriaux et son [moins] vieux Mac