<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.5730.11" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
        BEHAVIOR: url(#default#VML)
}
o\:* {
        BEHAVIOR: url(#default#VML)
}
w\:* {
        BEHAVIOR: url(#default#VML)
}
.shape {
        BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType
namespaceuri="urn:schemas-microsoft-com:office:smarttags"
name="PersonName"></o:SmartTagType><!--[if !mso]>
<STYLE>st1\:* {
        BEHAVIOR: url(#default#ieooui)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
        font-family: Tahoma;
}
@font-face {
        font-family: Verdana;
}
@page Section1 {size: 612.0pt 792.0pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; }
font-face {
        FONT-FAMILY: Verdana
}
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.emailstyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial
}
SPAN.EmailStyle18 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle19 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle20 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle21 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle23 {
        COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=296494923-07122006><FONT face=Arial
color=#0000ff size=2>I'm surprised that there are methods which are available to
the MapAgent but not the APIs. </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296494923-07122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=296494923-07122006><FONT face=Arial
color=#0000ff size=2>Was this a case of deliberate exclusion, or not enough time
to get everything in? I can see there being some arguments for not
exposing these methods (only need them for rendering, etc) but there are
apparently going to be some use cases for accessing them :)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=296494923-07122006></SPAN><SPAN
class=296494923-07122006><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=296494923-07122006><FONT face=Arial
color=#0000ff size=2>Jason</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma><FONT size=2><B>From:</B> Walt Welton-Lair<SPAN
class=296494923-07122006><FONT face=Arial
color=#0000ff> <BR></FONT></SPAN><B>Sent:</B> Thursday, December 07, 2006
15:47<BR><B>To:</B> users@mapguide.osgeo.org<BR><B>Subject:</B> RE:
[mapguide-users] MgTileService - GetTile - Cannot establish
connection<BR></FONT></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff size=2>Sorry about that - I forgot that the Set methods
weren't exposed.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff size=2>As Alain mentioned, <SPAN
class=655101823-07122006>currently </SPAN>the only way to update the view
is <SPAN class=655101823-07122006>via </SPAN>certain HTTP requests.
GETMAP / GETMAPUPDATE / GETPLOT are used <SPAN class=655101823-07122006>in
the context of </SPAN>DWFViewer, while GETMAPIMAGE and GETVISIBLEMAPEXTENT
are used <SPAN class=655101823-07122006>in the context of</SPAN> AJAX
Viewer. You can include additional parameters with <SPAN
class=655101823-07122006>any of </SPAN>these requests to update view
related information:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff
size=2> SETDISPLAYDPI=<dpi></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff
size=2> SETDISPLAYWIDTH=<width></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff
size=2> SETDISPLAYHEIGHT=<height></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff
size=2> SETVIEWSCALE=<scale></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff size=2> S</FONT></SPAN><SPAN
class=851280623-07122006><FONT face=Arial color=#0000ff
size=2>ETVIEWCENTERX=<centerX></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><FONT face=Arial
color=#0000ff
size=2> SETVIEWCENTERY=<centerY><BR></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=851280623-07122006><FONT face=Arial><FONT color=#0000ff><FONT size=2>While
you can use <SPAN class=655101823-07122006>a </SPAN><SPAN
class=655101823-07122006>viewer </SPAN>to <SPAN
class=655101823-07122006>make these requests for you</SPAN>, you <SPAN
class=655101823-07122006>can make the HTTP r</SPAN>equests <SPAN
class=655101823-07122006>yourself and get the same effect.
</SPAN></FONT></FONT></FONT></SPAN></SPAN><SPAN class=851280623-07122006><SPAN
class=851280623-07122006><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=655101823-07122006>You could write an application
that:</SPAN></FONT></FONT></FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=851280623-07122006><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=655101823-07122006></SPAN></FONT></FONT></FONT></SPAN></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=851280623-07122006><FONT size=+0><FONT color=#0000ff><FONT size=2><SPAN
class=655101823-07122006></SPAN></FONT></FONT></FONT></SPAN></SPAN><SPAN
class=851280623-07122006><SPAN class=655101823-07122006><FONT face=Arial
color=#0000ff size=2>1) creates a session</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=655101823-07122006><FONT face=Arial color=#0000ff size=2>2) creates an
MgMap for your MapDefinition that is part of your
session</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=655101823-07122006><FONT face=Arial color=#0000ff size=2>3)
m</FONT></SPAN></SPAN><SPAN class=851280623-07122006><SPAN
class=655101823-07122006><FONT face=Arial color=#0000ff size=2>akes one of the
HTTP requests above</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=655101823-07122006><FONT face=Arial color=#0000ff size=2>
- GETVISIBLEMAPEXTENT is the simplest</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=655101823-07122006><FONT face=Arial color=#0000ff size=2>
- include the SETVIEWSCALE parameter with the request to set the
scale you want</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=655101823-07122006><FONT face=Arial color=#0000ff size=2>4) makes calls
to GetTile</FONT></SPAN></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=851280623-07122006><SPAN
class=655101823-07122006><FONT face=Arial color=#0000ff size=2>5) repeats steps
3 and 4 for each desired scale</FONT></SPAN></SPAN></DIV><SPAN
class=851280623-07122006>
<DIV dir=ltr align=left>
<DIV dir=ltr align=left><FONT face=Arial><FONT color=#0000ff size=2><SPAN
class=851280623-07122006></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN class=655101823-07122006>For steps 1
and 2 there's should be sample code under the MgMap
documentation.</SPAN></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN
class=655101823-07122006></SPAN></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN class=655101823-07122006>For step 3
something like .NET's HttpRequest class probably works. Just make the
request to your MG server, e.g.</SPAN></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN
class=655101823-07122006>http:://localhost/mapguide/mapagent?</SPAN></SPAN></FONT></FONT><FONT
size=+0><FONT face=Arial color=#0000ff size=2><SPAN
class=851280623-07122006><SPAN
class=655101823-07122006>OPERATION=GETVISIBLEMAPEXTENT&VERSION=1.0.0&SESSION=<sessionId>&MAPNAME=<mapName>&SETVIEWSCALE=<scale></SPAN></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN
class=655101823-07122006></SPAN></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN class=655101823-07122006>Here,
mapName is the name from the MgMap.</SPAN></SPAN></FONT></FONT></DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN
class=655101823-07122006></SPAN></SPAN></FONT></FONT> </DIV>
<DIV dir=ltr align=left><FONT size=+0><FONT face=Arial color=#0000ff
size=2><SPAN class=851280623-07122006><SPAN
class=655101823-07122006>Walt</SPAN></SPAN></FONT></FONT></SPAN></DIV></DIV></DIV></BODY></HTML>