[Mapbender-users] zoom to coordinates out of a popup window

Andreas Voit a_voit at gmx.at
Tue Apr 13 11:24:17 EDT 2010


hallo christoph,

thanks.

The error doesn't appear anymore. I only need to know if my thinking is
correct: When I use the target attribute, I can use the "mapframe1" to
zoom to a coordinate location?

cu

Andreas

Am 13.04.2010 17:13, schrieb Christoph Baudson (Wheregroup):
> I see, it must be
> 
> $_GET[]
> 
> with square brackets, not round brackets.
> 
> Thanks
> 
> Christoph
> 
> 
> 
> Andreas Voit schrieb:
>> hallo,
>>
>> I already send the source code, I mean the line where the error occurs.
>> Again:
>>
>> "$target=$_GET('target');" is the line where the error occurs. But as
>> attachment I send you also the source code. I marked the line with the
>> comment "<!-- HERE OCCURS THE ERROR -->".
>>
>> In the mapbender GUI I created a button to open the formular. The
>> attributes in the GUI configuration: 'onclick='searchWindow =
>> window.open("/form/form.php?sessionID&target=mapframe1,overview","searchWin","width=800,
>>
>> height=600, scrollbars=yes, resizable=yes");');'
>>
>> In summary it's normal formular, I have to get some values for dropdown
>> list from an postgreSQL db (Bezirke). I know it is not a elegant
>> solution, but it works ;)
>>
>> hope you can help me.
>>
>> cu
>>
>>
>> Am 13.04.2010 16:21, schrieb Christoph Baudson (Wheregroup):
>>  
>>> Hi Andreas,
>>>
>>> thanks for your mail. Please forward the source of form.php and the line
>>> where the error occured.
>>>
>>> Thanks,
>>>
>>> Christoph
>>>
>>>
>>> Andreas Voit schrieb:
>>>    
>>>> hallo,
>>>>
>>>> I'd like to press a button in a popup window and then it should zoom to
>>>> a location.
>>>>
>>>> I found the tool "zoomCoords" in GUI1. But that only works if it is
>>>> used
>>>> in the map user interface. I want to uses it in a popup window.
>>>>
>>>> so it has problem to find the function "zoom", I guess it is a map
>>>> specific function and is only available at the map gui.
>>>>
>>>> <code>
>>>>     zoom(mod_zoomCoords_target[0],true, 1.0,x,y);
>>>> </code>
>>>>
>>>> As you can see in the code example there is use a variable
>>>> "mod_zoomCoords_target[0]", which I guess is "mapframe1,overview".
>>>>
>>>> So I tried to make a url query string to my own gui element button:
>>>>
>>>> <code>
>>>>     onclick='searchWindow =
>>>> window.open("form.php?sessionID&target=mapframe1,overview","searchWin","width=800,
>>>>
>>>>
>>>> height=600, scrollbars=yes, resizable=yes");');'<?php
>>>> $target=$_GET('target');?>
>>>> </code>
>>>>
>>>> In my form.php I want to save the value of target into a variable like:
>>>>
>>>> <code>
>>>>     <?php $target=$_GET('target');?>
>>>> </code>
>>>>
>>>> Then I get an error: Fatal error: "Function name must be a string in
>>>> \mapbender\http\form\form.php"
>>>>
>>>>
>>>> In summery I want to zoom to a location in a map, by pressing a custom
>>>> button, which is in a popup window.
>>>>
>>>> Does anyone know a solution, I would be happy ;)
>>>>
>>>> cu
>>>>
>>>> My System
>>>> ++++++++++++
>>>> Mapbender 2.6
>>>> Windows XP + SP3
>>>> XAMPP 1.7.3
>>>> Database Postgres 8.4 + PostGIS
>>>> GeoServer 2.0.1
>>>>
>>>>         
>>>     
>>
>>
>>  
>> ------------------------------------------------------------------------
>>
>>
>>     Einfache Suche
>>
>> end up here checkresult($resultBezirk,$queryBezirk); ?>
>>
>>     * Bezirk * Bezirk auswählen <#>
>>     * " ?> KG * Katastralgemeinde auswählen <#>
>>     * Grundstücksnr Grundstücksnummer (optional) <#>
>>     * Umkreis Auswahl eines Buffers indem Massenbewegung gesucht
>>       werden soll (optional) <#>
>>    *
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Mapbender_users mailing list
>> Mapbender_users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapbender_users
>>   
> 
> 


-- 
---
Andreas Voit
http://andreasvoit.heim.at/
Windows kam, sah und versagte


More information about the Mapbender_users mailing list