<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi Maria!<div><br></div><div>You can access the demo service of mapproxy via <a href="http://127.0.0.1:8080/demo/">http://127.0.0.1:8080/demo/</a> .</div><div>There you can see your defined layers. </div><div><br></div><div>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)</div><div><br></div><div><div><div>HTH</div><div>Marcel</div><div><br></div><div>On 13 Jul 2014, at 23:19, Cruz, Petagay [USA] <<a href="mailto:cruz_petagay@bah.com">cruz_petagay@bah.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div fpstyle="1" ocsi="0" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div style="direction: ltr; font-family: Tahoma; 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>  ["<a href="http://a.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png">http://a.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png</a>",</div><div>   "<a href="http://b.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png">http://b.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png</a>",</div><div>   "<a href="http://c.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png">http://c.tile.openstreetmap.org/cycle/${z}/${x}/${y}.png</a>"]);</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:<span class="Apple-converted-space"> </span><a href="http://mapproxy.org/">http://mapproxy.org/</a></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:<span class="Apple-converted-space"> </span><a href="mailto:info@example.com">info@example.com</a></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>        (<a href="http://creativecommons.org/licenses/by-sa/2.0/">http://creativecommons.org/licenses/by-sa/2.0/</a>)</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<span class="Apple-converted-space"> </span><a href="http://openstreetmap.org/">openstreetmap.org</a><span class="Apple-converted-space"> </span>tiles. These will be downloaded upon request (if not already cached) and served by MapProxy</div><div>     type: tile</div><div>     url:<span class="Apple-converted-space"> </span><a href="http://c.tile.openstreetmap.org/%(tms_path)s.%(format)s">http://c.tile.openstreetmap.org/%(tms_path)s.%(format)s</a></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<a href="http://openstreetmap.org/">openstreetmap.org</a><span class="Apple-converted-space"> </span>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>_______________________________________________<br>MapProxy mailing list<br><a href="mailto:MapProxy@lists.osgeo.org">MapProxy@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/mapproxy">http://lists.osgeo.org/mailman/listinfo/mapproxy</a></div></blockquote></div><br></div></body></html>