[MapProxy] GIS client using MapProxy instead of OSM
Marcel Radischat
m.radischat at gin-n.de
Mon Jul 14 00:11:29 PDT 2014
Hi Maria!
You can access the demo service of mapproxy via http://127.0.0.1:8080/demo/ .
There you can see your defined layers.
If you click on one of those, a site will appear, which shows how OpenLayers 2.1x uses the services of mapproxy (WMS,WMST,TMS)
HTH
Marcel
On 13 Jul 2014, at 23:19, Cruz, Petagay [USA] <cruz_petagay at bah.com> wrote:
> I setup MapProxy on CENTOS. I just don't understand how a GIS client uses MapProxy. i have configured MapProxy to server OSM. I found an example of OpenLayers GIS client that uses OSM. I would like an example of OpenLayers GIS (java script) that uses MapProxy to get OSM layer.
>
> for example, here is an OpenLayers setup to use OSM:
> new OpenLayers.Layer.OSM("OpenStreetMap",
> ["http://a.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png",
> "http://b.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png",
> "http://c.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png"]);
>
> What would this look like if using MapProxy instead? My mapproxy service is on say http://192.168.1.101:8080
> I start my MapProxy with
>
> mapproxy-util serve-develop mapproxy.yaml
>
> Here is my mapproxy.yaml:
> -----------------------
> services:
> #sets up how to make the source data available
> demo:
> tms:
> wms:
> #srs sets the coordinate reference systems as which you want to make your data available. MapProxy reprojects the source data very well to these projections.
> srs: ['EPSG:900913','EPSG:3857']
> image_formats: ['image/jpeg', 'image/png']
> md:
> # metadata used in capabilities documents
> title: MapProxy WMS Proxy
> abstract: This is the fantastic MapProxy.
> online_resource: http://mapproxy.org/
> contact:
> person: Your Name
> position: Technical Director
> organization: Some Company
> address: Long street
> city: Timbuktu
> postcode: 123456AD
> country: South Pole
> email: info at example.com
> access_constraints:
> This service is intended for private and evaluation use only.
> The data is licensed as Creative Commons Attribution-Share Alike 2.0
> (http://creativecommons.org/licenses/by-sa/2.0/)
> fees: 'None'
>
> layers:
> #sets up which layers you want to make available using the services above. You can add many, but let's stick to osm data here.
> - name: osm
> title: Open Streetmap Tiles
> sources: [osm_cache] #this layer should use the osm_cache (defined below) as it's source.
>
> caches:
> #setup the cache for the open streetmap tiles. This cache is used by the layer above.
> osm_cache:
> sources: [osm_tiles] #here you set what source data (defined below) you want to cache
> format: image/png
>
> sources:
> osm_tiles:
> #the osm_tiles source refers to the openstreetmap.org tiles. These will be downloaded upon request (if not already cached) and served by MapProxy
> type: tile
> url: http://c.tile.openstreetmap.org/%(tms_path)s.%(format)s
> grid: osm_grid #the grid to use for the osm tiles. This is really important. It is specified below.
>
> grids:
> osm_grid:
> #this srs and origin specify a grid that can be used elsewhere in the configuration. In this example it is used for the osm_tiles source. These settings are correct foropenstreetmap.org tiles.
> #The google mercator srs is used (also called EPSG:900913), and the origin of the tiles is north-west). If you get this wrong, you might very well get an all-blue world.
> srs: EPSG:900913
> origin: nw
>
> globals:
> #next are some global configuration options for MapProxy. They mostly explain themselves, or can be looked-up in the MapProxy docs.
> cache:
> # where to store the cached images
> base_dir: './cache_data'
> # where to store lockfiles
> lock_dir: './cache_data/locks'
>
>
> # image/transformation options
> image:
> resampling_method: bilinear
> jpeg_quality: 90
>
> ------------------------------
>
> Thank you for any help. What about a GIS client that uses Bing maps?
> Maria Cruz
>
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20140714/6341c02e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20140714/6341c02e/attachment.pgp>
More information about the MapProxy
mailing list