Mapwidth & Mapheight

View: New views
5 Messages — Rating Filter:   Alert me  

Mapwidth & Mapheight

by Kai Behncke-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello List,
I´m totally new to p.mapper and I´m quite impressed.
For a project I would like to change the surface of map.phtml a bit.

I would like to have a map that is fixed at a width of 400 px (the same with
the height).
I thought I just could change:
   var mapW = <?php echo "400"; ?>;
    var mapH = <?php echo "400"; ?>;

, but if I do the map still spreads nearly the whole window.
Also in my mapfile I have 400 and 400,
What can I do to get a fixed map with these parameters?

Thank you very much, Kai

--
Dipl.-Geogr. Kai Behncke

Institut für Geoinformatik und Fernerkundung (IGF)
Universität Osnabrück
Kolpingstr. 7
49074 Osnabrück

Raum: 01/308
Tel.: +49 541 969-4450
E-Mail: mailto:kbehncke@...
Web:  http://www.igf.uni-osnabrueck.de


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
pmapper-users mailing list
pmapper-users@...
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Re: Mapwidth & Mapheight

by Armin Burger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

It should work if you do the following (assuming p.mapper in version 2.1
or so):

in pmapper.js for function init():

comment out the line
   window.onresize = function(){resizeDiv();}

then substitute the line
   resizeDiv();
with
   var mapurl = PM_XAJAX_LOCATION + 'x_load.php?'+SID+
'&zoom_type=zoompoint';
     updateMap(mapurl, '');

This worked for me for a first test. The mapW/mapH are the values taken
from the map file, so change these settings there.

You might need some fine tuning of the various DIV's for height/width
etc., depending how you define your layout, in order to have the various
elements correctly aligned to each other.

armin

Kai Behncke wrote:

> Hello List,
> I´m totally new to p.mapper and I´m quite impressed.
> For a project I would like to change the surface of map.phtml a bit.
>
> I would like to have a map that is fixed at a width of 400 px (the same with
> the height).
> I thought I just could change:
>    var mapW = <?php echo "400"; ?>;
>     var mapH = <?php echo "400"; ?>;
>
> , but if I do the map still spreads nearly the whole window.
> Also in my mapfile I have 400 and 400,
> What can I do to get a fixed map with these parameters?
>
> Thank you very much, Kai
>
> --
> Dipl.-Geogr. Kai Behncke
>
> Institut für Geoinformatik und Fernerkundung (IGF)
> Universität Osnabrück
> Kolpingstr. 7
> 49074 Osnabrück
>
> Raum: 01/308
> Tel.: +49 541 969-4450
> E-Mail: mailto:kbehncke@...
> Web:  http://www.igf.uni-osnabrueck.de
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@...
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
pmapper-users mailing list
pmapper-users@...
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Re: Mapwidth & Mapheight

by Kai Behncke-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 07 Nov 2006 19:02:01 +0100, Armin Burger wrote

> It should work if you do the following (assuming p.mapper in version
> 2.1 or so):
>
> in pmapper.js for function init():
>
> comment out the line
>    window.onresize = function(){resizeDiv();}
>
> then substitute the line
>    resizeDiv();
> with
>    var mapurl = PM_XAJAX_LOCATION + 'x_load.php?'+SID+
> '&zoom_type=zoompoint';
>      updateMap(mapurl, '');
>
> This worked for me for a first test. The mapW/mapH are the values
> taken from the map file, so change these settings there.
>
> You might need some fine tuning of the various DIV's for
> height/width etc., depending how you define your layout, in order to
> have the various elements correctly aligned to each other.
>
> armin
>
Hello List,
so far I nearly have my apllication like I want it to be, but there is still
the little problem of the Mapwidth and the Mapheight.
I changed "pmapper.js" like Armin said (thank you :-) ) and now I
find it much easier to adapt the layout to my wishes, but, for example:

If I change the width and height parameters in the mapfile (for example to 600
600) and open http://localhost/pmapper/map.phtml for a moment
the map appears with the width and height of 600 600, but one moment later
it is going smaller.
I presume, there still must be an java script based automaticall resize, but
where ?
Does anyone know?
Thank you very much.
 
--
Dipl.-Geogr. Kai Behncke

Institut für Geoinformatik und Fernerkundung (IGF)
Universität Osnabrück
Kolpingstr. 7
49074 Osnabrück

Raum: 01/308
Tel.: +49 541 969-4450
E-Mail: mailto:kbehncke@...
Web:  http://www.igf.uni-osnabrueck.de


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
pmapper-users mailing list
pmapper-users@...
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Re: Mapwidth & Mapheight

by Armin Burger :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kai

the whole thing is a bit more complicated than I was hoping and it makes
a complete re-design of the general layout even more necessary.

For a fast workaround you could try the following:

use the default 'init()' function. Then in 'resiveDiv()' replace the
parts that set the variables winx & winy with the following

winix = rawW('pm_master');
winiy = rawH('pm_master');

Then in map.phtml put the whole elements into a master DIV

<div id="pm_master" style="position:absolute; top:0px; left:0px;
height:750px; width:900px">
....
</div>

and adapt the width/height settings to the values you want.


All of this is not very flexible at the moment and one modification can
cause some strange side-effects on other elements and needs an
adaptation there, in particular for the offsets in zoombox.js.

Armin

Kai Behncke wrote:

> On Tue, 07 Nov 2006 19:02:01 +0100, Armin Burger wrote
>> It should work if you do the following (assuming p.mapper in version
>> 2.1 or so):
>>
>> in pmapper.js for function init():
>>
>> comment out the line
>>    window.onresize = function(){resizeDiv();}
>>
>> then substitute the line
>>    resizeDiv();
>> with
>>    var mapurl = PM_XAJAX_LOCATION + 'x_load.php?'+SID+
>> '&zoom_type=zoompoint';
>>      updateMap(mapurl, '');
>>
>> This worked for me for a first test. The mapW/mapH are the values
>> taken from the map file, so change these settings there.
>>
>> You might need some fine tuning of the various DIV's for
>> height/width etc., depending how you define your layout, in order to
>> have the various elements correctly aligned to each other.
>>
>> armin
>>
> Hello List,
> so far I nearly have my apllication like I want it to be, but there is still
> the little problem of the Mapwidth and the Mapheight.
> I changed "pmapper.js" like Armin said (thank you :-) ) and now I
> find it much easier to adapt the layout to my wishes, but, for example:
>
> If I change the width and height parameters in the mapfile (for example to 600
> 600) and open http://localhost/pmapper/map.phtml for a moment
> the map appears with the width and height of 600 600, but one moment later
> it is going smaller.
> I presume, there still must be an java script based automaticall resize, but
> where ?
> Does anyone know?
> Thank you very much.
>  
> --
> Dipl.-Geogr. Kai Behncke
>
> Institut für Geoinformatik und Fernerkundung (IGF)
> Universität Osnabrück
> Kolpingstr. 7
> 49074 Osnabrück
>
> Raum: 01/308
> Tel.: +49 541 969-4450
> E-Mail: mailto:kbehncke@...
> Web:  http://www.igf.uni-osnabrueck.de
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@...
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
pmapper-users mailing list
pmapper-users@...
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Re: Mapwidth & Mapheight

by sumarno :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

How does if we want get autosize/autoscroll for whole page ? so when we identify/search object that display in infozone it will give us more space view (to down) ?? (i use pmapper 3.2 in windows XP)

Armin Burger wrote:
Kai

the whole thing is a bit more complicated than I was hoping and it makes
a complete re-design of the general layout even more necessary.

For a fast workaround you could try the following:

use the default 'init()' function. Then in 'resiveDiv()' replace the
parts that set the variables winx & winy with the following

winix = rawW('pm_master');
winiy = rawH('pm_master');

Then in map.phtml put the whole elements into a master DIV

<div id="pm_master" style="position:absolute; top:0px; left:0px;
height:750px; width:900px">
....
</div>

and adapt the width/height settings to the values you want.


All of this is not very flexible at the moment and one modification can
cause some strange side-effects on other elements and needs an
adaptation there, in particular for the offsets in zoombox.js.

Armin

Kai Behncke wrote:
> On Tue, 07 Nov 2006 19:02:01 +0100, Armin Burger wrote
>> It should work if you do the following (assuming p.mapper in version
>> 2.1 or so):
>>
>> in pmapper.js for function init():
>>
>> comment out the line
>>    window.onresize = function(){resizeDiv();}
>>
>> then substitute the line
>>    resizeDiv();
>> with
>>    var mapurl = PM_XAJAX_LOCATION + 'x_load.php?'+SID+
>> '&zoom_type=zoompoint';
>>      updateMap(mapurl, '');
>>
>> This worked for me for a first test. The mapW/mapH are the values
>> taken from the map file, so change these settings there.
>>
>> You might need some fine tuning of the various DIV's for
>> height/width etc., depending how you define your layout, in order to
>> have the various elements correctly aligned to each other.
>>
>> armin
>>
> Hello List,
> so far I nearly have my apllication like I want it to be, but there is still
> the little problem of the Mapwidth and the Mapheight.
> I changed "pmapper.js" like Armin said (thank you :-) ) and now I
> find it much easier to adapt the layout to my wishes, but, for example:
>
> If I change the width and height parameters in the mapfile (for example to 600
> 600) and open http://localhost/pmapper/map.phtml for a moment
> the map appears with the width and height of 600 600, but one moment later
> it is going smaller.
> I presume, there still must be an java script based automaticall resize, but
> where ?
> Does anyone know?
> Thank you very much.
>  
> --
> Dipl.-Geogr. Kai Behncke
>
> Institut für Geoinformatik und Fernerkundung (IGF)
> Universität Osnabrück
> Kolpingstr. 7
> 49074 Osnabrück
>
> Raum: 01/308
> Tel.: +49 541 969-4450
> E-Mail: mailto:kbehncke@igf.uni-osnabrueck.de
> Web:  http://www.igf.uni-osnabrueck.de
>
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> pmapper-users mailing list
> pmapper-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users