[mapguide-users] Little patch to make ajaxviewer as fast as google.maps

Zac Spitzer zac.spitzer at gmail.com
Mon Apr 6 03:47:34 EDT 2009


here's a demo using apache http://ennoble.dreamhosters.com/maps/tm-kl/

using the nginx webserver is even faster !

be aware that exposing your whole tilecache will expose
everything (private sessions as well), whereas exposing a base
layer group at a time also means much shorter urls
which helps as well

i would avoid 1 year as expiry, especially if you are exposing the
whole tile cache
as the urls are fixed, if you use the approach I describe above you can avoid
this problem as you can simply change the url of the virtual directory otherwise
you need to rename your map to deliver any changes out

also using a proxy in front of your webserver anyway will achieve this
load reduction,
then with a 1 day expiry there's only a single 304 check from the
proxy once a day
isn't really much load to avoid and you can maintain flexibility

I would like to see support for this moved into the server itself.

Perhaps for the anonymous case, the server could just write sym links for
anonymously accessible tiled maps into another dir which could then be exposed

z



On Mon, Apr 6, 2009 at 5:34 PM, Bruno Scott <bscott at geomapgis.com> wrote:
>
> Instead of the patch there is the updated files. Easier to test :)  These files are for Mapguide OpenSource 2.02.
> First step  backup these files before
>  www
>    webcongfig.ini
>  www/mapviewernet
>    common.aspx
>    mapframe.aspx
>  www/mapviewerphp
>    common.php
>    mapframe.php
>  www/viewerfiles
>    ajaxmappane.templ
>
> second step  Copy the files in the zip file
>
> Patch_HttpTile_MG202.zip
>
>
> How to use it
> 1) You need a weblayout with base group. you can try with the Sheboygan_tile but it is much more impressive when you try it with huge rasters.
>
> 2) You need to pre generate all tiles, you can do it with the Maestro Preview ( it could take hours...)
>
> 3) Create un virtual directory on "MapGuideOpenSource2.0\Server\Repositories\TileCache"
>
> 4) open the webconfig.ini file, set the useHttpTile to 1 and update the TileServerUrls to your newly created virtual directory.
>    UseHttpTile=1
>    FirstGroupImageFormat = PNG
>    TileServerUrls=http://myServer/mgTiles
>
> Try it ...
>
> You can try some optimisations
> a)  Set some expiry date on your webserver. As your webserver only serves image file you can set the expiry date to 1 year. So even if you close your browser, the tiles still reside on your browser cache, making display incredebly fast when you reopen it.
>
> b) You can copy your tiles directory to another server, This will remove a lot of pressure on your Mapguide server. The Mapguide server will only serves the other dynamic layers.
>
> c) If your Tile server is still to slow, you could copy the tiles on as many server as you wish.
> TileServerUrls=http://myServer1/mgTiles;yttp://myServer2/mgTiles...
>
> d) Some raster image are big when they are in png format. You can decide to use jpg format. If your tiles are smaller, the first download process will be faster. This is only valid for the first base group, all other base group must be png ( for transparency)
>
> e) Even if you have only one server, you can set 4 alias to your webserver. A browser can load up to 4 image at the time ( default values for IE and firefox). With this trick your browser will load tiles faster, if you have a good bandwidth
>
>
>
> --
> View this message in context: http://n2.nabble.com/Little-patch-to-make-ajaxviewer-as-fast-as-google.maps-tp2580480p2591715.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


More information about the mapguide-users mailing list