[mapserver-users] How to configure mapserver as a tile server?

Hishan Melanga hishanm at gmail.com
Sun May 26 00:14:57 PDT 2013


Can you take a look at my
mapcache.xml<https://docs.google.com/document/d/1yiwhofPOHDtKaFynhXdH0SPbQhojXZGnd5cw9dBNH7A/edit?usp=sharing>and
my
osm-google.map<https://docs.google.com/document/d/1jjdKjJ1kxMFRGTJAstAJ5qk8zUo6MWsYLxW827bC2LM/edit?usp=sharing>file?
I don't know what I have done wrong. It's not producing the tiles.


On Sun, May 26, 2013 at 9:21 AM, Stephen Woodbridge <woodbri at swoodbridge.com
> wrote:

> On 5/25/2013 11:08 PM, Hishan Melanga wrote:
>
>> What is the link to access the tiles in web browser if I used your .xml
>> as the configuration? Is it still http://example.com/mapcache/**demo<http://example.com/mapcache/demo>or
>> something else.
>>
>
> You would replace example.com with your host name.
>
> Also note the blue (+] buttom in the upper right of the demo map page,
> open this is you have multiple services or tilesets defined and you can
> select that one you want to view.
>
> Here is my demo page that has data for the US and is pulling tiles from my
> mapcache instance.
>
> http://imaptools.com:8080/**demo/tiger-demo2.html<http://imaptools.com:8080/demo/tiger-demo2.html>
>
> -Steve
>
>
>  On Sat, May 25, 2013 at 7:47 PM, Stephen Woodbridge
>> <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.**com<woodbri at swoodbridge.com>>>
>> wrote:
>>
>>     So the way this works is:
>>
>>     browser <----> mapcache <----> mapserver_wms
>>
>>     So look at the demo page if you have mapcache.xml configured then
>>     you should see a simple OpenLayers application that pulls tiles from
>>     mapcache.
>>
>>     your mapcache.xml needs look something like this. The referrences in
>>     the source block are explicit references to names in my mapfile.
>>     Obviously parameter values need to be change for your server and
>>     mapfile.
>>
>>     -Steve
>>
>>     <?xml version="1.0" encoding="UTF-8"?>
>>     <mapcache>
>>        <metadata>
>>          <title>iMaptools mapcache service</title>
>>          <abstract>Contains various services for iMaptools maps</abstract>
>>        </metadata>
>>
>>        <cache name="disk" type="disk">
>>          <base>/u/mapcache</base>
>>          <symlink_blank/>
>>        </cache>
>>
>>        <source name="tiger2011" type="wms">
>>          <getmap>
>>            <params>
>>              <FORMAT>image/png</FORMAT>
>>              <MAP_IMAGETYPE>agg_qn</MAP___**IMAGETYPE>
>>              <LAYERS>Tiger_2011</LAYERS>
>>              <MAP>/u/data/tiger2011-maps/__**tiger2011-mc.map</MAP>
>>            </params>
>>          </getmap>
>>
>>          <http>
>>            <url>http://localhost/cgi-bin/**__mapserv-60<http://localhost/cgi-bin/__mapserv-60>
>>
>>     <http://localhost/cgi-bin/**mapserv-60<http://localhost/cgi-bin/mapserv-60>
>> ></url>
>>          </http>
>>        </source>
>>
>>        <format name="PNGQ_FAST" type="PNG">
>>          <compression>fast</__**compression>
>>
>>          <colors>256</colors>
>>        </format>
>>
>>        <tileset name="tiger-base">
>>          <source>tiger2011</source>
>>          <cache>disk</cache>
>>          <grid>WGS84</grid>
>>          <grid>g</grid>
>>          <format>PNGQ_FAST</format>
>>          <metatile>5 5</metatile>
>>          <!-- metabuffer must be the abs() of what is in the mapfile -->
>>          <metabuffer>20</metabuffer>
>>          <expires>3600</expires>
>>        </tileset>
>>
>>        <default_format>PNGQ_FAST</__**default_format>
>>
>>
>>        <service type="wms" enabled="true">
>>          <full_wms>assemble</full_wms>
>>          <resample_mode>bilinear</__**resample_mode>
>>
>>          <format>PNGQ_FAST</format>
>>          <maxsize>4096</maxsize>
>>        </service>
>>        <service type="wmts" enabled="true"/>
>>        <service type="tms" enabled="true"/>
>>        <service type="kml" enabled="true"/>
>>        <service type="gmaps" enabled="true"/>
>>        <service type="ve" enabled="true"/>
>>        <service type="demo" enabled="true"/>
>>
>>        <errors>report</errors>
>>        <lock_dir>/tmp</lock_dir>
>>
>>     </mapcache>
>>
>>
>>
>>     On 5/25/2013 9:47 AM, Hishan Melanga wrote:
>>
>>         ok. Now I have http://example.com/mapcache/__**demo<http://example.com/mapcache/__demo>
>>
>>         <http://example.com/mapcache/**demo<http://example.com/mapcache/demo>>
>> working. But how can I
>>         get my mapserver's wms connect to it.
>>
>>
>>         On Sat, May 25, 2013 at 10:42 AM, Hishan Melanga
>>         <hishanm at gmail.com <mailto:hishanm at gmail.com>
>>         <mailto:hishanm at gmail.com <mailto:hishanm at gmail.com>>> wrote:
>>
>>              Thanks. I installed mapcahe and started to learn about the
>> xml
>>              configuration file. Reading
>>         http://mapserver.org/mapcache/**__config.html<http://mapserver.org/mapcache/__config.html>
>>
>>         <http://mapserver.org/**mapcache/config.html<http://mapserver.org/mapcache/config.html>>
>> as a start. Hope it
>>         is the
>>              first thing that I should do.
>>
>>
>>              On Sat, May 25, 2013 at 8:07 AM, Stephen Woodbridge
>>              <woodbri at swoodbridge.com <mailto:woodbri at swoodbridge.**com<woodbri at swoodbridge.com>
>> >
>>         <mailto:woodbri at swoodbridge.__**com
>>
>>         <mailto:woodbri at swoodbridge.**com <woodbri at swoodbridge.com>>>>
>> wrote:
>>
>>                  On 5/24/2013 10:06 PM, Hishan Melanga wrote:
>>
>>                      I have a working mapserver and I can view my map
>> using
>>         http://localhost/cgi-bin/____**mapserv?map=/path/to/map&mode=**
>> ____browse&template=**openlayers&____layers=all<http://localhost/cgi-bin/____mapserv?map=/path/to/map&mode=____browse&template=openlayers&____layers=all>
>>         <http://localhost/cgi-bin/__**mapserv?map=/path/to/map&mode=**
>> __browse&template=openlayers&_**_layers=all<http://localhost/cgi-bin/__mapserv?map=/path/to/map&mode=__browse&template=openlayers&__layers=all>
>> >
>>
>>
>>         <http://localhost/cgi-bin/__**mapserv?map=/path/to/map&mode=**
>> __browse&template=openlayers&_**_layers=all<http://localhost/cgi-bin/__mapserv?map=/path/to/map&mode=__browse&template=openlayers&__layers=all>
>>         <http://localhost/cgi-bin/**mapserv?map=/path/to/map&mode=**
>> browse&template=openlayers&**layers=all<http://localhost/cgi-bin/mapserv?map=/path/to/map&mode=browse&template=openlayers&layers=all>
>> >>.
>>
>>                      Now I want to give out those data to public as
>>         tiles giving
>>                      a single URL
>>                      such as tile.myserver.org
>>         <http://tile.myserver.org> <http://tile.myserver.org>
>>
>>
>>                      <http://tile.myproxy.org/>. How can I achieve
>>
>>                      this using Mapserver? What is the place to start?
>> What
>>                      tutorials I have
>>                      to read? I've read that Mapserver has a tile mode
>>                      <http://mapserver.org/output/_**___tile_mode.html<http://mapserver.org/output/____tile_mode.html>
>>         <http://mapserver.org/output/_**_tile_mode.html<http://mapserver.org/output/__tile_mode.html>
>> >
>>
>>
>>                      <http://mapserver.org/output/_**_tile_mode.html<http://mapserver.org/output/__tile_mode.html>
>>         <http://mapserver.org/output/**tile_mode.html<http://mapserver.org/output/tile_mode.html>
>> >>>.
>>                      Thanks in advance.
>>
>>
>>                  mapcache it the tile server for mapserver. So you will
>>         want to
>>                  look at that. The basic scenario is this:
>>
>>                  1. setup mapserver as a WMS server
>>                  2. build and install mapcache as an apache module
>>                  3. setup a mapcache.xml to describe you WMS server, and
>>         your cache.
>>                      make sure you configure the demo service initially
>>         for testing
>>                      you can disable it later if you want
>>                  4. restart apache
>>                  5. http://example.com/mapcache/__**__demo<http://example.com/mapcache/____demo>
>>         <http://example.com/mapcache/_**_demo<http://example.com/mapcache/__demo>
>> >
>>
>>
>>                  <http://example.com/mapcache/_**_demo<http://example.com/mapcache/__demo>
>>         <http://example.com/mapcache/**demo<http://example.com/mapcache/demo>
>> >>
>>
>>                  whenever you change your mapcache.xml you need to start
>>         apache
>>                  so it reads your changes.
>>
>>                  -Steve W
>>                  ______________________________**_____________________
>>                  mapserver-users mailing list
>>                  mapserver-users at lists.osgeo.__**__org
>>                  <mailto:mapserver-users at lists.**__osgeo.org
>>         <mailto:mapserver-users at lists.**osgeo.org<mapserver-users at lists.osgeo.org>
>> >>
>>         http://lists.osgeo.org/____**mailman/listinfo/mapserver-___**
>> _users <http://lists.osgeo.org/____mailman/listinfo/mapserver-____users>
>>         <http://lists.osgeo.org/__**mailman/listinfo/mapserver-__**users<http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>
>> >
>>
>>
>>         <http://lists.osgeo.org/__**mailman/listinfo/mapserver-__**users<http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>
>>         <http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>> >>
>>
>>
>>
>>
>>              --
>>              හිෂාන් මෙලංග | Hishan Melanga
>>         <http://hishanmelanga.__blogsp**ot.com/ <http://blogspot.com/>
>>
>>         <http://hishanmelanga.**blogspot.com/<http://hishanmelanga.blogspot.com/>
>> >>
>>
>>
>>
>>
>>         --
>>         හිෂාන් මෙලංග | Hishan Melanga
>>         <http://hishanmelanga.__blogsp**ot.com/ <http://blogspot.com/>
>>         <http://hishanmelanga.**blogspot.com/<http://hishanmelanga.blogspot.com/>
>> >>
>>
>>
>>
>>
>>         ______________________________**___________________
>>         mapserver-users mailing list
>>         mapserver-users at lists.osgeo.__**org
>>         <mailto:mapserver-users at lists.**osgeo.org<mapserver-users at lists.osgeo.org>
>> >
>>         http://lists.osgeo.org/__**mailman/listinfo/mapserver-__**users<http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>
>>         <http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>> >
>>
>>
>>     ______________________________**___________________
>>     mapserver-users mailing list
>>     mapserver-users at lists.osgeo.__**org
>>     <mailto:mapserver-users at lists.**osgeo.org<mapserver-users at lists.osgeo.org>
>> >
>>     http://lists.osgeo.org/__**mailman/listinfo/mapserver-__**users<http://lists.osgeo.org/__mailman/listinfo/mapserver-__users>
>>     <http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>> >
>>
>>
>>
>>
>> --
>> හිෂාන් මෙලංග | Hishan Melanga <http://hishanmelanga.**blogspot.com/<http://hishanmelanga.blogspot.com/>
>> >
>>
>>
>> ______________________________**_________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
>> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>>
>>
> ______________________________**_________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.**org <mapserver-users at lists.osgeo.org>
> http://lists.osgeo.org/**mailman/listinfo/mapserver-**users<http://lists.osgeo.org/mailman/listinfo/mapserver-users>
>



-- 
හිෂාන් මෙලංග | Hishan Melanga <http://hishanmelanga.blogspot.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130526/d7187134/attachment-0001.html>


More information about the mapserver-users mailing list