[mapguide-users] RenderMap in C#

Jim O'Leary joleary.public at gmail.com
Tue Jul 31 11:05:58 EDT 2007


I'm implementing the createimagemap.php DevGuide sample in C#. When I use
"GIF" as the format argument to RenderMap I see a blank image with a brown
background (which is the color argument). When I use PNG or JPG I just see a
blank image.

Here's my C# code.

MgByteReader byteReader = renderingService.RenderMap(map, selection, 
envelope, width, height, color, "PNG");
Response.AddHeader("Content-type: ", byteReader.GetMimeType() );

byte[] buffer= new byte[50000];
while (byteReader.Read(buffer, 50000) != 0)
{
    Response.BinaryWrite(buffer);
}

Any suggestions? I've also tried Response.Buffer and Response.BufferOutput
to no effect.

Thanks.
-- 
View this message in context: http://www.nabble.com/RenderMap-in-C--tf4193602s16610.html#a11925975
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list