[Chameleon] Widgets or JSAPI

Jason Fournier jfournier at dmsolutions.ca
Tue Aug 16 13:20:50 EDT 2005


I think the cursorpos widget populates the CursorPos_X, CursorPos_Y form 
vars with the current geographic position:


(note that these are the cursospos labels)

You could grab these values with your onclick when over the map and pass 
them back to your opener.

I would take a look at the MapNotes widget.  It has much of the 
functionality that you going after ... it should shed some light.  This 
functionality includes allowing a widget to have control over map 
onclicks, etc.

You shouldn't have to use JSAPI for this functionality - it can be 
achieved with Chameleon in the default mode.


Seiple, Timothy E wrote:
> I have a web application that requires the user to manually enter 
> coordinate information into a form.  I would like to provide a button, 
> whose on_click event will launch an instance of chameleon with a map 
> that allows the user to click on the map to get the coordinates.  The 
> coordinates must then be passed as variables back to the calling form.  
> A remote Oracle DB will provide the spatial data and store the captured 
> coordinate information.
> Can I do this with Widgets or must I use the JSAPI?  I am confused about 
> where I can place scripts.  For example, my template uses the Cursorpos 
> Widget to dynamically display {x,y} but how do I capture these in 
> variables that can be passed to other pages?  I can see the Chameleon 
> generated JavaScripts and variables in the page source but don't know 
> how to interact with them.
> I need some help understanding the big picture.
> Thanks,
> Tim
> ------------------------------------------------------------------------
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon

Jason Fournier

DM Solutions Group Inc.
jfournier at dmsolutions.ca
613.565.5056 x18

More information about the Chameleon mailing list