<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">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.
<div><br>
</div>
<div>for example, here is an OpenLayers setup to use OSM:</div>
<div>
<div>new OpenLayers.Layer.OSM("OpenStreetMap",</div>
<div> ["http://a.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png",</div>
<div> "http://b.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png",</div>
<div> "http://c.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png"]);</div>
</div>
<div><br>
</div>
<div>What would this look like if using MapProxy instead? My mapproxy service is on say <a href="http://192.168.1.101:8080" target="_blank">http://192.168.1.101:8080</a></div>
<div>I start my MapProxy with </div>
<div><br>
</div>
<div>mapproxy-util serve-develop mapproxy.yaml</div>
<div><br>
</div>
<div>Here is my mapproxy.yaml:</div>
<div>-----------------------</div>
<div>
<div>services:</div>
<div> #sets up how to make the source data available</div>
<div> demo:</div>
<div> tms:</div>
<div> wms:</div>
<div> #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.</div>
<div> srs: ['EPSG:900913','EPSG:3857']</div>
<div> image_formats: ['image/jpeg', 'image/png']</div>
<div> md:</div>
<div> # metadata used in capabilities documents</div>
<div> title: MapProxy WMS Proxy</div>
<div> abstract: This is the fantastic MapProxy.</div>
<div> online_resource: http://mapproxy.org/</div>
<div> contact:</div>
<div> person: Your Name</div>
<div> position: Technical Director</div>
<div> organization: Some Company</div>
<div> address: Long street</div>
<div> city: Timbuktu</div>
<div> postcode: 123456AD</div>
<div> country: South Pole</div>
<div> email: info@example.com</div>
<div> access_constraints:</div>
<div> This service is intended for private and evaluation use only.</div>
<div> The data is licensed as Creative Commons Attribution-Share Alike 2.0</div>
<div> (http://creativecommons.org/licenses/by-sa/2.0/)</div>
<div> fees: 'None'</div>
<div><br>
</div>
<div>layers:</div>
<div> #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.</div>
<div> - name: osm</div>
<div> title: Open Streetmap Tiles</div>
<div> sources: [osm_cache] #this layer should use the osm_cache (defined below) as it's source.</div>
<div> </div>
<div>caches:</div>
<div> #setup the cache for the open streetmap tiles. This cache is used by the layer above.</div>
<div> osm_cache:</div>
<div> sources: [osm_tiles] #here you set what source data (defined below) you want to cache</div>
<div> format: image/png</div>
<div> </div>
<div>sources:</div>
<div> osm_tiles:</div>
<div> #the osm_tiles source refers to the openstreetmap.org tiles. These will be downloaded upon request (if not already cached) and served by MapProxy</div>
<div> type: tile</div>
<div> url: http://c.tile.openstreetmap.org/%(tms_path)s.%(format)s</div>
<div> grid: osm_grid #the grid to use for the osm tiles. This is really important. It is specified below.</div>
<div><br>
</div>
<div>grids:</div>
<div> osm_grid:</div>
<div> #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 for openstreetmap.org tiles.</div>
<div> #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.</div>
<div> srs: EPSG:900913</div>
<div> origin: nw</div>
<div><br>
</div>
<div>globals:</div>
<div> #next are some global configuration options for MapProxy. They mostly explain themselves, or can be looked-up in the MapProxy docs.</div>
<div> cache:</div>
<div> # where to store the cached images</div>
<div> base_dir: './cache_data'</div>
<div> # where to store lockfiles</div>
<div> lock_dir: './cache_data/locks'</div>
<div> </div>
<div> </div>
<div> # image/transformation options</div>
<div> image:</div>
<div> resampling_method: bilinear</div>
<div> jpeg_quality: 90</div>
</div>
<div><br>
</div>
<div>------------------------------</div>
<div><br>
</div>
<div>Thank you for any help. What about a GIS client that uses Bing maps?</div>
<div>Maria Cruz</div>
<div><br>
</div>
</div>
</body>
</html>