[mapguide-users] DigitizePoint from a new browser window

Peter Scigalla scigalla at battefeld.com
Mon Sep 14 01:34:08 EDT 2009


Hello,

my task: I'am trying to pickup a point coordinate when the user clics on 
the map to center the map on this point with a new scale.

It runs fine when I do this from the task pane. Here a code snippet:

############
....
    <script  language="javascript" type="text/javascript">
      function DigitizePoint(m) {
          if (m==8888) {
          var ttt= 1 + 1;
                  ttt = prompt("Geben Sie den Maßstab ein", 5000);
          abc = ttt-0;
          }
          else
          {
          abc=m;
          }
          parent.parent.mapFrame.DigitizePoint(OnPointDigitized, abc);
      }

      function OnPointDigitized(point, m) {
          var x, y, m, parameter;
          x = point.X;
          y = point.Y;
          parent.parent.mapFrame.ZoomToView(x, y, abc, true);
      }
      </script>
</head>

<body>
....

<br><hr><p></p>
<input type="button" value=" 1:500 " onclick="DigitizePoint(500);">
<br>
<input type="button" value=" Freier Zoom " onclick="DigitizePoint(8888);">
<br><hr>
</body>
........
############

But how to call the DigitizePoint function from a new window???

I have tried it with

opener.mapFrame.DigitizePoint(OnPointDigitized, abc);

and a lot of other versions, but all failed.

I Know, it's a simple HTML/JavaScript question, but I hope anyway for 
some advise.

Thanks in advance!

Best regards - Peter

My configuration:

MGOS 2.0.2
Apache & PHP
simple WebLayout with AJAX Viewer


More information about the mapguide-users mailing list