Hi all,

Am new to p.mapper, trying to configure the first pmapper application,
however after modifying the config file i get no error messages but the
displays a balank page. Anyone who can to help.

Regards,
Karani.

-----Original Message-----
From: Armin Burger [mailto:armin.bur...@gmail.com] 
Sent: Friday, November 13, 2009 6:50 PM
To: Niccolo Rigacci
Cc: pmapper-users@lists.sourceforge.net
Subject: Re: [pmapper-users] Where to find docs about PM.Dlg.createDnRDlg ?

On 13/11/2009 16:14, Niccolo Rigacci wrote:
> Hi,
> 
> I'm trying to use pmapper native dialogs in the digitizepoints 
> plugin, but I'm totally newbie about objects like 
> PM.Dlg.createDnRDlg.
> 
> Someone has a pointer or two to start with?
> 
> Thank you.
> 


Niccolo

you need to define some options for the dialog inside your 
'Digitizepoints:' object

like

digitizeDlgOptions: {width:480, height:480, left:100, top:50,
              resizeable:true, newsize:true,
                      container:'pmDlgContainer', name:"digitize"},

Most parameters should self-explaining, some not:

'newsize': defines if the dialog should always be reset to its 
width/height defined in the options. If false it keeps the dimensions of 
the state when it was closed last time.

'container': defines the ID of a <div> element to add the dialog to. But 
don't worry too much with this, if the container with this ID does not 
exist it will be created automatically. You should just avoid to use 
ID's that might already be used for other things (like 'map'). If 2 
dialogs use the same container then opening one will always close the 
other one if already opened (like 'print' and 'download', just try).

'name': should be unique (treat it like an ID, no blanks, no special 
chars), so taking the name of the plugin directory (which must be 
unique) is a good idea. But only important if more than 1 dialog are 
open at the same time.

Then define a URL to be loaded and launch the dialog like


openCoordinatesDlg: function(imgxy) {

    ...
     var digitizeUrl = PM_PLUGIN_LOCATION +
      '/digitizepoints/digitizepoints.php?lon=' + px + "&lat=" + py;

      PM.Dlg.createDnRDlg(this.digitizeDlgOptions,_p('Name-in-title-bar'),
             digitizeUrl);

    ...
},


The PM.Dlg.createDnRDlg() applies the options passed via the function 
call, puts the title in the title bar of the dialog (inside a "_p()" 
it's translated if the language files have this string defined), and 
then loads the content returned from the URL (via Ajax) passed as 3rd 
argument.

The advantage of this instead of a pop-up windows is that you don't get 
pop-up warnings and all existing Javascript functions are available 
without the need to load them again. The dialog cannot disappear behind 
the main window, and you do not need to work with the annoying 'opener' 
stuff.

armin


----------------------------------------------------------------------------
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus
on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to