landview DHTML interface: adding elements
David Bitner
osgis.lists at GMAIL.COM
Fri Jul 29 12:06:45 PDT 2005
Use the postdraw() function to call your function then do something in
your function like
document.getElementById('message').innerHtml=message.
On 7/29/05, Dylan Beaudette <dylan at iici.no-ip.org> wrote:
> Greetings,
>
> I am interested in building on top of the excellent landview DHTML interface
> for mapserver. Specifically, I would like to add a bit of text just below the
> scale bars, with a message about the map scale. I would like this message to
> be updated with every interaction with the map. My attempts thus far are not
> updated after map interaction.
>
> So far i have created a function that creates a custom message based on the
> scale of the map like this:
>
> function display_current_message()
> {
> var current_scale = ms.getscale();
> var message = "";
>
> if(current_scale > 50001 )
> {
> message = "You are currently working with scale A.";
> }
> else
> {
> message = "You are currently working with scale B.";
> }
>
> return message;
> }
>
> <div id="message"
> (put message here via JS)
> </div>
>
>
> Is there a general method of updating the contents of the landview DHTML page
> that i can use to update my custom bit of text?
>
> thanks in advance!
>
> --
> Dylan Beaudette
> Soils and Biogeochemistry Graduate Group
> University of California at Davis
> 530.754.7341
>
More information about the MapServer-users
mailing list