[OpenLayers-Users] Radio button to interract with map

Mark Prins mc.prins at gmail.com
Fri Apr 19 08:03:48 PDT 2013


2013/4/11 Gaëtan Palka <palka.gaetan at gmail.com>:
> Hi everybody,
>
> For my research project, I try to develop a web map application but I'm a
> great beginner in web development.
> My web app has to change the style of the layers according to selected radio
> button.
> I have written these two files. The first is my page in php :
> --------------------------------------------------------------------------------
> <?php
> session_start();
> $_SESSION["login"]="bob";
> ?>
> <!DOCTYPE html>
> <html>
> <head>
> <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
> <title>IMaDeS bis</title>
> <script type="text/javascript"
> src="IMaDeS/OpenLayers/lib/OpenLayers.js"></script>
> <link rel="stylesheet" href="test.css" type="text/css">
> </head>
> <body onload="init()">
> <form name="formulaire" method="post" action="test_carte.php">
> <div id="bloc">
> <div id="bloc_alea">
> Bonjour <?php echo $_SESSION["login"]; ?>
> <div id="couche_alea">
> <input type="radio" name="alea" value="alea_value_green" id="alea_id_green"
> checked="checked" onchange="init(alea);" />green
> <input type="radio" name="alea" value="alea_value_blue" id="alea_id_blue"
> onchange="init(alea);" />blue

you probably want to use onselect if you're listening to the radio,
because this will trigger both for unselect and select events for both
radio's.


More information about the Users mailing list