[Chameleon] Re: mapsize and jsapi
Brent Lund
Brent.Lund at state.mn.us
Tue Mar 6 12:33:54 EST 2007
Liz,
I'm finally getting around to implementing the mapsize tool you've
built.
I've made the changes to cscjsapi.js and UpdateMap.php as you
instructed. My initial attempt at using the template you provided
generated the following script error:
"goCWCJSAPI is not defined" MapDHTML.js (line 694).
Line 694 is found in MapWRegisterForEvent:
function MapWRegisterForEvent()
{
goCWCJSAPI.RegisterEvent(MAP_EXTENT_CHANGED, "MapWMapExtentsChanged");
....
What did I miss?
Thanks
Brent
-----Original Message-----
From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Liz Godwin
Sent: Monday, February 05, 2007 1:04 PM
To: chameleon at lists.maptools.org
Subject: [Chameleon] Re: mapsize and jsapi
it seems the test of this message was ommitted in the posting that
come through. I'm resending the text portion only (see below) as plain
text. If you have a problem with the attachments and want them,
please contact me directly.
Cheers,
Liz
> Hello list,
>
> I've had a couple of requests about how we made the map resize
automatically
> with a window resize in our applications
> see http://nlwis-snite1.agr.gc.ca/eco/ for an example
> application.
>
> I agree it could be written a bit better - but I don't have a lot of
time
> for doing that before posting, so instead I will pass off what I hope
is all
> the files I affected for this functionality. I've included a template
file
> with css and js files that create a wireframe of the application with
only
> MapDHTML and CompassPoint Widgets. I've also included the snippits
from the
> cwcjsapi.js and UpdateMap.php that I added. The snippit in cwcjsapi
is a
> function, so it's no important where exactly it goes in the file. the
> snippit in UpdateMap should happen just before the
$oMapSession->saveState()
> line (~ 750 something).
>
> The positioning of these elements is done first with CSS and then the
> resizing is done with JavaScript. The positioning is relative to
adjacent
> components, so leaving the wireframe in helps to see how that is done.
>
> Really the javascript should be with the widget and not separate like
I have
> it. I started out having it separate and havn't had a chance to move
it in.
> When something works, it's hard to start breaking it ;-)
>
> Feel free to run with the code - if you make improvements, I wouldn't
mind
> hearing about them. Also, please don't hesitate to post folllow up
> questions. I did this assembling in haste and i might have missed
something
> or not it explained it well enough.
>
> Cheers,
>
> Liz Godwin
>
>
_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/chameleon
More information about the Chameleon
mailing list