[mapguide-users] Programmatically using GetMapKML, GetLayerKML and GetFeatureKML in .NET

DevMan ajay.srivastava13 at googlemail.com
Fri Apr 18 08:12:29 EDT 2008


Jackie. Many thanks for this.

Yes, I have been able to set up the functions to work, but it returns a
MgByteReader, which can only be taken in the MgByteSink to generate an XML
file.

What if someone does not want to create an XML file and just use an
XMLWriter to create the XML in memory and stream it to the client (Google
Earth).

Hope to find a solution to this.

Thanks a lot.

A.

http://www.vouchers4gifts.co.uk/2008/04/watch-ipl-cricket-in-uk-for-5-pound.htm 

Jackie C. Ng wrote:
> 
> The key to using the KML service programmatically is that you need to have
> the runtime map (ie the MgMap object), that you either:
> 
> - Create() from a Map Definition resource id
> 
> OR
> 
> - Open() from a runtime map name
> 
> Once you have an MgMap instance, the rest of the parameters should be
> self-explanatory.
> 
> - Jackie
> 
> 
> DevMan wrote:
>> 
>> Hello All,
>> 
>> I am a newbiew to Mapguide 2.0 OS API and I would be very grateful, if
>> someone could plz help me out on this.
>> 
>> All I need to do is to use the GetMapKML, GetLayerKML and GetFeatureKML
>> programmatically in a C# aspx page. The purpose is to generate a KML feed
>> for Google Earth on the fly.
>> 
>> The GetMapKML in MapAgent and also the link like
>> http://localhost/mapguide/mapagent/mapagent.fcgi?OPERATION=GetMapKml&VERSION=1.0.0&MAPDEFINITION=Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&FORMAT=KML&LOCALE=en
>> 
>> works fine, but I need to implement it on a separate aspx page, which
>> would then return the KML.
>> 
>> I know that the GetMapKMl etc. return a ByteReader, but can't really put
>> in the parameters in these GetKML methods.
>> 
>> Its really urgent, so If someone could please post a functional code that
>> I could possibly implement or modify to my needs.
>> 
>> Many thanks in advance.
>> 
>> Ajay
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Programmatically-using-GetMapKML%2C-GetLayerKML-and-GetFeatureKML-in-.NET-tp16697335s16610p16763383.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list