[Mapserver-users] Different instances to the same map II
Steve Lime
steve.lime at dnr.state.mn.us
Mon Dec 15 10:29:15 PST 2003
You can cram as many maps on one page as you like. Just alter parameters and use mode=map within img tags to generate them.
Steve
>>> Vladimir Guzmán <vguzman at maintask.com> 12/11/2003 10:24:24 AM >>>
Juan Carlos:
I can see you are using mapserver CGI.
I don't know if this is possible to do with CGI, we use PHP-mapscript,
which give us much more power to deal with this kind of things.
--
Vladimir Ilich Guzmán R.
------------------------
http://www.maintask.com
Juan Carlos Fuchs wrote:
>
> Hi listers
> I sent this text first to Jaime Mejía, who answers that, yes it is
> posible to call diferent .maps in base to a inicial query and to
> change them on the fly, also it seems posible with only one .map
> changing the parameters to generate the needed output and display them
> on the same template. And that was all!
>
> The intention was to get a clue, in how I can get this done!
>
> No answers up to day, so I tray again
>
> BTW, sorry my english is not the best, good german, good spanish, very
> few listers to talk with. :) so you have to suffer my English. :(
>
> Im trayng to get diferent instances of the same .map in respective
> .png/gif s that all in the same template.
> in brief i try to get different zoomed instances of the same query,
> lets say on close up for the country with the selected province in
> hilite, the next image with that province in close zoom and the
> selected department in hilite, and so on up to 2 more inside divisions.
>
> The thing is that the shpextent feature only retrives the results for
> the active layer, but i dont find the work arround to get the others
> active, just to trigger the shpextend and get the zoom_centered result
> i need for each instance.
>
> I attached some examples of how close i came, but its no good enough,
> sorry to those who dont want attach s in their mail s
>
> Thanks in advance, for any help or advice you can give to me.
> It s close enough, Merry Cristmas!
>
> Juan Carlos Fuchs
>
> Respuesta a Jaime:
> Le agradezco la paciencia, de tomarse el trabajo de descifrar mi
> Ingles-suajiry.
> De momento estoy tratando de resolver eso de "también un solo .map
> modificando los parámetros al aire para generar las salidas que
> necesita y desplegarlas en la misma plantilla"
> Hasta ahora llegué a resolver con una consulta múltiple, la siguiente
> instancia (ver imagen en attach)
> Lo que todavía no pude resolver es hacer un zoom a los polígonos
> seleccionados en cada capa (layer) y centrarlos en marco respectivo.
> Hasta hoy el mapext=shape, fija la posición geográfica y la escala, en
> función de la consulta hecha a la capa activa. no encuentro la forma
> de hacer que recalcule el mapext=shape, para las capas subsiguientes,
> que si bien están visibles, no son la capa activa.
>
> Desde ya le agradezco cualquier pista, sugerencia o ayuda que me pueda
> dar.
> A espera de su respuesta,
> Juan Carlos Fuchs
> Arq. Master en Computación Gráfica
> INDEC , Dirección de Informática, of 610 - Nuevas Tecnologias.
>
> A continuación le agrego un sector del Demo.footer, donde desarrollo
> las vistas que me interesan.
>
>
> <p><b><font color="#990000">Ejemplos de Consultas
> Cartográficas</font></b></p>
> <table cellpadding="3" cellspacing="0" border="0">
> <tr><td align="center"><img border="2" src="/mapas37[img]"></td>
> <td align="center"><img border="2"
> src="[program]?map=[map]
> &queryfile=[map_web_imagepath]DEMO[id].qy
>
> &layer=argdep # capa con los poligonos correspondientes a los
> departamentos
>
> &layer=limppdf # capa con las lineas de division politica
> (pais,provincia,departamento y fracción)
>
> &mode=itemquerymap # esto lo encontre rehurgando entre correos de la
> bolsa de mapserver
> &mapext=shape # devuelve el o los poligonos seleccionados centrados y
> con un zoom al total + un 5 %
>
> &map_layer_2_maxscale=30000000 # aqui revierto la restriccion impuesta
> en el archivo.map
> &map_querymap_style=Selected
>
> &map_querymap_size=160+160"> # define el tamaño de la ventanita que
> despliega el mapa.
> </td>
>
> <td align="center"><img border="2"
>
> src="[program]?map=[map]
> &queryfile=[map_web_imagepath]DEMO[id].qy
> &layer=argfrac # capa con los poligonos correspondientes a las fracciones
> &layer=limppdf
> &mapext=shape
> &map_layer_3_maxscale=30000000
> &map_querymap_style=Selected
> &mode=itemquerymap
> &map_querymap_size=160+160">
>
> </td>
> <td align="center"><img border="2"
> src="[program]?map=[map]
> &queryfile=[map_web_imagepath]DEMO[id].qy
> &layer=argprov # capa con los poligonos correspondientes a las provincias
> &layer=limppdf
>
> &mapext=1488751.096646 3338539.830000 6230700.293354 8087820.200000 #
> aqui quiero mostrar todo el pais, resaltando la o las provincias
> seleccionadas.
> &map_querymap_style=Selected
> &mode=itemnquerymap
> &map_querymap_size=160+160">
> </td>
> </tr>
>
> <tr><td align="center">Consulta cartográfica Estándar</th>
> <td align="center">Consulta en Cache</th>
>
> <td align="center">[minx] [miny] [maxx] [maxy]</th> # simple intento
> por ver que variables me trae el Mapserver
> <td align="center">[mapx] [mapy] </th> # idem
> </table>
> <form>
> <input type="button"
> value="Siguiente"
> onClick="history.go(1)" style="float: right">
>
> <input type="button"
> value="Anterior"
> onClick="history.back()" style="float: right">
>
> <input type="button"
> value="Cerrar Ventana"
> onClick="self.close ()" style="float: left">
> </form>
>
>
>
>
>
>
> ----- Original Message -----
> *From:* Jaime Mejía <mailto:jaime at main-task.com>
> *To:* Juan Carlos Fuchs <mailto:jfuch at indec.mecon.gov.ar>
> *Sent:* Wednesday, December 03, 2003 9:58 PM
> *Subject:* Re: [Mapserver-users] Different instances to the same map
>
> Juan Carlos Fuchs wrote:
>
>> Hi Listers!
>> Im struggling the last days with this problem, i m not a
>> programer, just a descent arcview user, and working on a
>> mapserver project.
>> Hope some of you could help.
>> Resume: When i trigger a query, i want to show to the User, the
>> different in_sights of the geographical zone.
>> Say in one map, show the entire country with the province
>> selected, hiligted; in an other map the selected province as big
>> as posible, with the selected department, hiligted; and at least,
>> one map with the selected department as big as posible, and in
>> hilite the fraction where the user clicked the first map in the
>> browser.
>> It is posible to do? In one template, three instances of the same
>> map, with the same layers displayed, but with a different layer
>> active in each, just to make posible to active the shapeext
>> feature, and so get each polygon (country, province, department)
>> as big as posible, and the selected
>> polygon hilite (say one smaller division of the poligon to wich I
>> zoomed extend)
>>
>> I apologize for my bad english,
>> Thanks in advance
>> Juan Carlos Fuchs
>>
>> Respuesta de Jaime
>
> Si es posible, con mapscript puede llamar diferentes .map que
> además los puede modificar al aire con base en la consulta
> inicial. O tambien un solo .map modificando los parametros al aire
> para generar las salidas que necesita y desplegarlas en la misma
> plantilla.
>
> --
>
> Cordial saludo,
>
> Jaime Mejía Molina
> *MAIN TASK*
> Teléfono: 218 46 08
> Dirección: Diagonal 85 # 28-39
>
> Bogota D. C., Colombia
> e-mail: jaime at main-task.com <mailto:jaime at main-task.com>
> website: www.main-task.com <http://www.main-task.com/>
>
>
> ------------------------------------------------------------------------
>
More information about the MapServer-users
mailing list