RE: [mapguide-users] Open map and zoom to feature?

2009-01-28 Thread JamesDudden



Mark Pendergraft wrote:
 
 ... I did it by putting a
 function into the taskpane that would loop continuously until the
 map.Refresh() function returned true.  Then I sent the feature
 information to my custom aspx page which returned a selectionXml...
 

Hi Mark,
Well done on getting this working - it has given me hope! It would be very
helpfull if you could post some of the code that you used.
Regards
James
-- 
View this message in context: 
http://n2.nabble.com/Open-map-and-zoom-to-feature--tp2223369p2231647.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


Re: [mapguide-users] Open map and zoom to feature?

2009-01-28 Thread Kenneth Skovhede, GEOGRAF A/S

I think this is the same question/answer:
http://n2.nabble.com/Zooming-to-a-defined-point-td2230987.html

Regards, Kenneth Skovhede, GEOGRAF A/S



Software-Matters skrev:

Hi,

I have searched the forum and found a few threads relating to this issue but
they all seem unresloved. Has anybody been able to achieve opening a map and
zooming straight to a specified feature?

I am using MGOS2 with .NET and IIS 5.1 - what I would ideally be able to do
is have a list of hyperlinks (linked to different maps and sets of features)
which the user clicks on to open a map and zoom to specific features at a
set zoom level.

I would appreciate any help or advice on this subject.

Regards
James
  

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


RE: [mapguide-users] Open map and zoom to feature?

2009-01-28 Thread JamesDudden



Mark Pendergraft wrote:
 
 ...function into the taskpane that would loop continuously until the
 map.Refresh() function returned true.  Then I sent the feature...
 

Mark,

I have now got a bodged version of the open-map-and-zoom function working
using a hard-written feature value.  What I would like to do is a have an
html page with list of values that a user can click to open the map to that
specific feature.

I have tried passing the value using a session variable and writing it in to
my filter but it doesn't work - I think this is a timing issue and thought
your map.refresh function might help. Could you post the code and where you
put the function?

Regards
James
-- 
View this message in context: 
http://n2.nabble.com/Open-map-and-zoom-to-feature--tp2223369p2233257.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


RE: [mapguide-users] Open map and zoom to feature?

2009-01-28 Thread Mark Pendergraft
function OnPageLoad()
{   
var initTimer = setInterval(waitForMap, 200);

// Wait for the map to be initialized.
// When it is, open the second task pane.
function waitForMap () 
{
try 
{
// The Refresh method will exist when the
// map has been initialized.
if (parent.parent.mapFrame.Refresh()) 
{
clearInterval(initTimer);
// Zoom to a Job if one was passed
ZoomToJobNo()
// Open the second task pane
window.location =
TasksOverview.aspx?%=Parameters %;
}
}
catch(Exception){}
}   
}

function ZoomToJobNo()
{
//your code to zoom goes here
}

This is the code that resides in my initial TaskPane page.  Once the map
comes up, this page attempts to zoom to a feature (job) and then loads a
different page in the TaskPane.

How your site is setup will determine how your code needs to be written.
You need to pass the necessary variables in from your URL to the
taskpane, and then use a script similar to this to wait until the map is
loaded.  Once the map is loaded you can zoom to a feature.

-Mark

-Original Message-
From: mapguide-users-boun...@lists.osgeo.org
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of JamesDudden
Sent: Wednesday, January 28, 2009 8:43 AM
To: mapguide-users@lists.osgeo.org
Subject: RE: [mapguide-users] Open map and zoom to feature?




Mark Pendergraft wrote:
 
 ...function into the taskpane that would loop continuously until the
 map.Refresh() function returned true.  Then I sent the feature...
 

Mark,

I have now got a bodged version of the open-map-and-zoom function
working
using a hard-written feature value.  What I would like to do is a have
an
html page with list of values that a user can click to open the map to
that
specific feature.

I have tried passing the value using a session variable and writing it
in to
my filter but it doesn't work - I think this is a timing issue and
thought
your map.refresh function might help. Could you post the code and where
you
put the function?

Regards
James
-- 
View this message in context:
http://n2.nabble.com/Open-map-and-zoom-to-feature--tp2223369p2233257.htm
l
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


RE: [mapguide-users] Open map and zoom to feature?

2009-01-27 Thread Mark Pendergraft
I had a feature like this in 1.2, basically I did it by putting a
function into the taskpane that would loop continuously until the
map.Refresh() function returned true.  Then I sent the feature
information to my custom aspx page which returned a selectionXml, then I
used the ExecuteMapAction(10) to zoom to selection.
I passed the feature information (that I wanted to zoom to) in from the
hyperlink that I used to activate the map.  The tricky part was getting
that info into the taskpane, because my map had several framesets in it.

-Mark

-Original Message-
From: mapguide-users-boun...@lists.osgeo.org
[mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of
Software-Matters
Sent: Tuesday, January 27, 2009 2:02 AM
To: mapguide-users@lists.osgeo.org
Subject: [mapguide-users] Open map and zoom to feature?


Hi,

I have searched the forum and found a few threads relating to this issue
but
they all seem unresloved. Has anybody been able to achieve opening a map
and
zooming straight to a specified feature?

I am using MGOS2 with .NET and IIS 5.1 - what I would ideally be able to
do
is have a list of hyperlinks (linked to different maps and sets of
features)
which the user clicks on to open a map and zoom to specific features at
a
set zoom level.

I would appreciate any help or advice on this subject.

Regards
James
-- 
View this message in context:
http://n2.nabble.com/Open-map-and-zoom-to-feature--tp2223369p2223369.htm
l
Sent from the MapGuide Users mailing list archive at Nabble.com.

___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users