[mapguide-users] gettile method problems

alucas alucas at srtec.com
Mon Dec 8 19:14:42 EST 2008


My version is MGOS 2.0.2

I'm not sure if I understand your second question Zac. When I call GetTile
method, the server also store this tiles in the TileCache directory. My
problem is when I only call GetTile method without store the returned tiles
in some directory. I don't know what is the reason, but if in every call to
GetTile I store the returned tile, the server service seems does not
crashes...

My first priority is to know what is going on... I don't know why several
calls to GetTile return the exception.

Thanks.


zspitzer wrote:
> 
> which version are you running? that always helps to mention it:)
> 
> you could just copy the tile cache?
> 
> 
> C:\Program Files\MapGuideOpenSource2.0\Server\Repositories\TileCache
> 
> On Tue, Dec 9, 2008 at 4:14 AM, alucas <alucas at srtec.com> wrote:
>>
>> Hello Kenneth,
>>
>> If after call GetTile I write the tile in a temporary directory, then the
>> service does not goes down. Strange behaviour...
>>
>> Now my code looks something like this:
>>
>> for (int s = scaleCount -1; s >=0; s--)
>> {
>>  // nTilesX and nTilesY calculation
>>  // ...
>>
>>  for (int r = 0; r <= nTilesX; r++)
>>  {
>>     for (int c = 0; c <= nTilesY; c++)
>>     {
>>            MgByteReader br = ts.GetTile(mapResId, layerGroup, c, r, s);
>>            MgByteSink bs = new MgByteSink(br);
>>            bs.ToFile(@"c:\Temp\s"+ s.ToString() +"_r"+r.ToString()+"_c"+
>> c.ToString()+".jpg");
>>
>>      }
>>  }
>> }
>>
>> If I comment the lines for write the tiles, then I get the exception
>> again.
>>
>> Any Idea?
>>
>>
>>
>> Kenneth Skovhede, GEOGRAF A/S wrote:
>>>
>>> I can't tell you exactly what goes wrong, but work for a tile generator
>>> has been done elsewhere.
>>>
>>> The FMTilingEngine prepares tiles, and automatically restarts the
>>> MapGuide service when it encounters the problem:
>>> http://www.websoftdev.com/download.cfm
>>>
>>> Zac has developed a browser based tile seeder:
>>> http://zacster.blogspot.com/2008/07/mapguide-tile-cache-seeder.html
>>>
>>> I am building a tile seeder for use with Maestro (not complete, and not
>>> released, LGPL):
>>> http://svn.osgeo.org/mapguide/trunk/Tools/Maestro/MgCooker/
>>>
>>> Perhaps the FMTilingEngine will solve your troubles.
>>> If not, you can consider building on one of the other solutions.
>>>
>>> Regards, Kenneth Skovhede, GEOGRAF A/S
>>>
>>>
>>>
>>> alucas skrev:
>>>> Hello all,
>>>>
>>>> I'm trying to develop a tile pre-generation desktop application. To do
>>>> this,
>>>> I'm using mapguidedotnetapi.dll reference. My program creates a
>>>> connection
>>>> to the server and through the tileservice try to call gettile method
>>>> for
>>>> every tile. My problem is that gettile method fails and returns an
>>>> xmlstream
>>>> exception, then I need to restart the server service because I get a
>>>> connection exception.
>>>>
>>>> This is the exception:
>>>>
>>>> http://www.nabble.com/file/p20872280/exception.jpg
>>>>
>>>> The exception happens not in the first gettile call, it happens when I
>>>> called several times this method. My program is something like this:
>>>>
>>>> ...
>>>> for each scalecount
>>>>   for each column
>>>>     for each row
>>>>       tileService.GetTile(mapResId, layerGroupName, c, r, s)
>>>> ...
>>>>
>>>> Solutions I tried:
>>>>
>>>> - Modify serverconfig.ini to enable poolconnections for my data.
>>>> - Use thread.sleep between iterations
>>>> - Use a separate thread to do this work
>>>> - Generate tiles only for a scale factor.
>>>>
>>>> This solutions does not work for me.
>>>>
>>>> Any idea?
>>>>
>>>> Sorry for my english...
>>>>
>>>> Thanks in advance
>>>>
>>>>
>>>>
>>> _______________________________________________
>>> mapguide-users mailing list
>>> mapguide-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/gettile-method-problems-tp20872280p20899422.html
>> Sent from the MapGuide Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> mapguide-users mailing list
>> mapguide-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>>
> 
> 
> 
> -- 
> Zac Spitzer -
> http://zacster.blogspot.com
> +61 405 847 168
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context: http://www.nabble.com/gettile-method-problems-tp20872280p20906387.html
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list