Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update leaflet and mapproxy quickstart mapnik tile layer #781

Merged
merged 2 commits into from
Aug 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions doc/quickstart/leaflet_quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Leaflet is a JavaScript library for browser-based, mobile-friendly, interactive
Running
================================================================================

Prior to running this quick start you should start TileStache. On OSGeoLive this can be found under **Geospatial\\Spatial Tools\\Start Mapnik & TileStache**.
Prior to running this quick start you should start MapProxy. On OSGeoLive this can be found under **Geospatial\\Web Services\\MapProxy\\Start MapProxy**.
This will provide background tiles that will be used in this demo.

View the example_
Expand All @@ -37,9 +37,6 @@ Before writing any code for the map, you need to do the following preparation st
.. code-block:: html

<link rel="stylesheet" href="/leaflet/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="/leaflet/leaflet.ie.css" />
<![endif]-->

* Include Leaflet JavaScript file:

Expand Down Expand Up @@ -74,13 +71,13 @@ By default (as we didn't pass any options when creating the map instance), all m
Note that setView call also returns the map object - most Leaflet methods act like this when they don't return an explicit value, which allows convenient jQuery-like method chaining.

Next we'll add a tile layer to our map.
In this case we will be using the tile images provided by TileStache on the live dvd. Note that using nicer background maps such as openstreetmap will result in a much better user experience.
In this case we will be using the tile images provided by MapProxy on the live dvd. Note that using nicer background maps such as openstreetmap will result in a much better user experience.

Creating a tile layer usually involves setting the URL template for the tile images, the attribution text and the maximum zoom level of the layer:

::

L.tileLayer('http://localhost:8012/example/{z}/{x}/{y}.png,{}).addTo(map);
L.tileLayer('http://localhost:8011/wmts/mapnik_tile/GLOBAL_WEBMERCATOR/{z}/{x}/{y}.png',{}).addTo(map);

If you have online access you may want to use a nicer tilemap as the background:

Expand Down
5 changes: 2 additions & 3 deletions doc/quickstart/mapproxy_quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@ Available layers
**mapnik**:
The world population rendered by Mapnik. You don't need to start the Mapnik service, because this layer makes use of the integrated Mapnik support in MapProxy.

**tilestache**:
TileStache is a server that delivers tiles from the Mapnik world population service. This layer demonstrates the ability to include existing tile services in MapProxy and to make them available as WMS.
You need to start TileStache with *Start Mapnik & TileStache* before accessing this layer.
**mapnik_tile**:
The world population rendered by Mapnik as tile layer.

**geoserver**:
The US population rendered by the :doc:`GeoServer <../overview/geoserver_overview>` WMS. This layer also supports ``GetFeatureInfo`` requests which are cascaded to the source WMS.
Expand Down