Using a Map in a Form popover is not acting correctly RDMLX
Using a Map in a Form popover is not acting correctly RDMLX
I want to display a map in a popover. I want the popover to have a height of 60% and I want the map to take the entire space of the popover. I have code that looks like this:
#COM_OWNER.Set_Form Name('/Form.Popover') Grid_Row_N(1) Grid_Row_Height(60%) Show_Popover(True)
#COM_OWNER.Set_Form Name('/Form.Popover') Grid_Col_N(1) Grid_Col_Width(100%)
#COM_OWNER.Set_Map Name('/Form.Popover.fields.map') Layout_Col(1) Layout_Row(1)
The popover does take up 60% of the height of the form, but the Map only takes up 60% of the height of the popover
I believe this is a bug, but I may be wrong. Please prove me wrong.
#COM_OWNER.Set_Form Name('/Form.Popover') Grid_Row_N(1) Grid_Row_Height(60%) Show_Popover(True)
#COM_OWNER.Set_Form Name('/Form.Popover') Grid_Col_N(1) Grid_Col_Width(100%)
#COM_OWNER.Set_Map Name('/Form.Popover.fields.map') Layout_Col(1) Layout_Row(1)
The popover does take up 60% of the height of the form, but the Map only takes up 60% of the height of the popover
I believe this is a bug, but I may be wrong. Please prove me wrong.
Regards,
David
David
-
Paul
Re: Using a Map in a Form popover is not acting correctly RD
There are a couple of things to this.
Firstly, the first line in the supplied code is setting grid row 1 of the popover form to a height of 60%. The map occupies grid row 1 of the popover form and so only takes up 60% of the popover.
This line of code is not necessary if the map is to take up 100% of the popover height.
Secondly, the popover is determining its own size based on content. You don't seem to be having a problem with the Popover size but if you wanted to control this you would have to set the popover form's layout height and width properties.
With popover size and position, it's important to remember that the OS will have the last say and will fit the popover where it can if it is pushed for space.
Firstly, the first line in the supplied code is setting grid row 1 of the popover form to a height of 60%. The map occupies grid row 1 of the popover form and so only takes up 60% of the popover.
This line of code is not necessary if the map is to take up 100% of the popover height.
Secondly, the popover is determining its own size based on content. You don't seem to be having a problem with the Popover size but if you wanted to control this you would have to set the popover form's layout height and width properties.
With popover size and position, it's important to remember that the OS will have the last say and will fit the popover where it can if it is pushed for space.
Re: Using a Map in a Form popover is not acting correctly RD
The goal is to make the popover 60% of the screen size. This accomplished that but the map only takes up 60% of the popover and I want it to be 100% of the popover (60%). I've tried many combinations and cannot find a solution.
Any Ideas?
Any Ideas?
-
Paul
Re: Using a Map in a Form popover is not acting correctly RD
The example code David provided is not setting the size of the popover. It's setting the height of the grid row of the popover that the map is on.
That's why the map is only taking up 60% of the popover. The popover is determining it's own size based on content.
Try setting the Grid_Row_Height in the first line of the code to 'Fit'.
That's why the map is only taking up 60% of the popover. The popover is determining it's own size based on content.
Try setting the Grid_Row_Height in the first line of the code to 'Fit'.
Re: Using a Map in a Form popover is not acting correctly RD
Paul, as I am stuggling to understand the exact code to perform what I want to do, could you please just provide a sample that will solve this situation. Thanks.
Regards,
David
David
-
Paul
Re: Using a Map in a Form popover is not acting correctly RD
Yes, I will try this out when I get a chance and post a sample.
-
Paul
Re: Using a Map in a Form popover is not acting correctly RD
Set the main form to show a popover
Set up a form popover
Add a map to the popover
This produces a popover roughly 60% of my iPad screen by controlling the size of the map and letting the popover determine its own size. The Layout_Height and Layout_Width parameters of the set_Map method can be adjusted as desired. Note that percentage values are not valid for Layout_Height and Layout_Width parameters.
Code: Select all
#COM_OWNER.Set_Form Show_Popover(True)Code: Select all
#COM_OWNER.Set_Form Name('/Form.Popover') Grid_Col_N(1) Grid_Col_Width(100%)Code: Select all
#COM_OWNER.Set_Map Name('/Form.Popover.fields.map') Layout_Col(1) Layout_Row(1) Layout_Height(400)Re: Using a Map in a Form popover is not acting correctly RD
Thanks Paul that worked good on my phone, will test ipad and galaxy tomorrow at work.
Re: Using a Map in a Form popover is not acting correctly RD
Well it is no where near the 60% size I want on my Ipad, more like 40%. That is what I expected with your hard coded pixel size. But it looked right on iphone.
How can I set the pop over map to 60% of my screen, help!
How can I set the pop over map to 60% of my screen, help!
Re: Using a Map in a Form popover is not acting correctly RD
Use this:
Code: Select all
If Cond(#COM_OWNER.ScreenOrientation = 'PORTRAIT')
#std_num := #com_owner.DevicePixelHeight * .60
Else
#std_num := #com_owner.DevicePixelWidth * .60
Endif
#COM_OWNER.Set_Form Show_Popover(True)
#COM_OWNER.Set_Form Name('/Form.Popover') Grid_Col_N(1) Grid_Col_Width(100%)
#COM_OWNER.Set_Map Name('/Form.Popover.fields.map') Layout_Col(1) Layout_Row(1) Layout_Height(#std_num)
Regards,
David
David