<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-2" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
If you read up on the samples for the Maestro API, you should notice a
redirect (last line):<br>
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/AddInitialLayer">http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI/samples/AddInitialLayer</a><br>
<br>
The redirect looks like this:<br>
<pre class="wiki">Response.Redirect("/mapguide/ajaxviewer/?LAYOUT=" & Server.UrlEncode(tempWebLayout) & "&SESSION=" & Server.UrlEncode(con.SessionID), true)
</pre>
For this to work, simply set the tempWebLayout variable to point at
your map.<br>
<br>
You don't need the SessionID for starters, you can just add:<br>
&USERNAME=Anonymous&PASSWORD=<br>
<br>
So you get:<br>
<pre class="wiki">Response.Redirect("/mapguide/ajaxviewer/?LAYOUT=" & Server.UrlEncode(tempWebLayout) & "&USERNAME=Anonymous&PASSWORD=", true)</pre>
<br>
What code is inside the file main.aspx that you mention?<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Nitin Chaturvedi skrev:
<blockquote
cite="mid:59d60ea20911082238q17ac12adr6348f4db8e60012c@mail.gmail.com"
type="cite">
<pre wrap="">I'd surely post the screenshot in a while!
but at the moment can you tell me how to set the new map that I've
created using Maestro?
I'm getting only the Shebogyan map in my samples. if I view it by
browsing through maestro the map appears perfectly, but if I browse
MAIN.aspx its showing shebogyan :(
How to change the source of the map? Thr new map is created using shape files !
Help awaited !! :(
2009/11/6 Ivan Miličević <a class="moz-txt-link-rfc2396E" href="mailto:Ivan.Milicevic@supranet.hr"><Ivan.Milicevic@supranet.hr></a>:
</pre>
<blockquote type="cite">
<pre wrap="">Could you post a screen or error details?
-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:mapguide-users-bounces@lists.osgeo.org">mapguide-users-bounces@lists.osgeo.org</a> [<a class="moz-txt-link-freetext" href="mailto:mapguide-users-bounces@lists.osgeo.org">mailto:mapguide-users-bounces@lists.osgeo.org</a>] On Behalf Of Nitin Chaturvedi
Sent: Friday, November 06, 2009 1:12 PM
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] totally new to MG
Hi kenneth,
My simple sole purpose is to show data of an area (delhi) and show
point of interests and provide the user with options to do various
kinds of search on those POIs. Thanks to your guidance I've created a
new map and added layers of delhi (shape Files). Now I'm stuck at the
coding part.
I'm getting errors in the dotnetsamples application and don't know how
to display the map of delhi in my own application. However when I
browse the through Maestro the map is coming perfectly with the themes
that I've applied.
don't know head or tail of what to do and where to start ! :)
thanks for your help !!!!
Nitin
On Thu, Nov 5, 2009 at 7:44 PM, Kenneth Skovhede, GEOGRAF A/S
<a class="moz-txt-link-rfc2396E" href="mailto:ks@geograf.dk"><ks@geograf.dk></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">If you have VS2005, I think the SP1 installs the "original" Web method as a
"Web Solution".
I can't really remember how to get around it, as I have VS 2008 now.
You usually don't "change the map", rather, you start with another map,
which you can then modify.
If you want to see how to modify the map during runtime, there are some
examples for using the MaestroAPI here:
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI">http://trac.osgeo.org/mapguide/wiki/maestro/MaestroAPI</a>
You can do the same using the regular API, although the class names, etc.
are different.
The two examples "Adding a layer before startup via Maestro API" and
"Modifying the filter on a layer"
are good examples for understanding where to plug into MapGuide.
Could you try to explain a specific task that you need to perform?
Regards, Kenneth Skovhede, GEOGRAF A/S
Nitin Chaturvedi skrev:
Thanks a ton Kenneth,
I've done that already...
& thanks to you I'm able to create my Map with shape files....... but
again its through Maestro & I can browse the map through it only. I
need to know how to change the map in the sample application as it
continues to display Sheboygan data.
secondly I have VS2005. If we discard the website method. Kindly
elaborate how to go about it.
thanks a Ton again U're gr8 (I'm actually exited to see the map with
shape files and now eager to use it on my own application)!!!
On Thu, Nov 5, 2009 at 1:54 PM, Kenneth Skovhede, GEOGRAF A/S
<a class="moz-txt-link-rfc2396E" href="mailto:ks@geograf.dk"><ks@geograf.dk></a> wrote:
If you have MapGuide Enterprise, you also have MapGuide Studio.
If you have either MapGuide Enterprise or MapGuideOpenSource,
you can try MapGuide Maestro:
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/wiki/maestro">http://trac.osgeo.org/mapguide/wiki/maestro</a>
Either tool can help you set up a map.
If you are starting 100% from scratch, you can install the sample data
package (called Sheboygan):
<a class="moz-txt-link-freetext" href="http://mapguide.osgeo.org/download/releases/2.0.x-samples">http://mapguide.osgeo.org/download/releases/2.0.x-samples</a>
Once you have a WebLayout working in Studio/Maestro, you can click the
"Preview" button.
This will show you the map in a working environment.
This environment is also a sample of how to develop such an application!
All the code for the various actions can be found in:
C:\Program Files\MapGuideOpenSource\Web\www\
(If you want to develop .Net applications, you must select the .Net API
during the install process).
To start developing an application, you bascially create a new .Net Web
Solution.
Carefull: don't use the "WebSite" method, as that is intended for CMS like
solutions,
and very hard to get working with MapGuide. Unfortunately this is default
with VS2005.
The Web solution must use IIS, not the internal development server,
configureable from the
project properties. If the "Web" tab is missing, or is missing the "Servers"
section, you have the
wrong type of "Web site".
Next, copy all dll's from MapGuide into the "bin" folder in your project.
The dll's are located here:
C:\Program Files\MapGuideOpenSource\WebExtensions\www\mapviewernet\bin
Then add a reference to the MapGuideDotNetApi.dll.
You can now access all the Mg* objects.
See the aspx files for samples:
C:\Program Files\MapGuideOpenSource\WebExtensions\www\mapviewernet\*.aspx
More samples here:
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/wiki/CodeSamples">http://trac.osgeo.org/mapguide/wiki/CodeSamples</a>
And make sure you read the FAQ:
<a class="moz-txt-link-freetext" href="http://trac.osgeo.org/mapguide/wiki/CodeSamples/AspDotNet/DevFAQ">http://trac.osgeo.org/mapguide/wiki/CodeSamples/AspDotNet/DevFAQ</a>
Regards, Kenneth Skovhede, GEOGRAF A/S
Nitin Chaturvedi skrev:
Hi everyone,
I'm totally new to MG. I'm trying to understand and develop a small
web application using .net and .SHP files. I've been reading all the
documentation provided with MG and have understood about the 3 tiers.
But unable to understand how to develop an application in .net I tried
to work on the sample applications provided with MG installer (windows
& IIS) but they are giving a lot of reference errors.
I need help BIG Time......
It would be really helpful if someone could provide me with a simple
"working" .net code which shows map, and options to zoom in/out, pan
and get info of features.
Thanks in advance !!
Warm Regards,
Nitin
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
</pre>
</blockquote>
</body>
</html>