<div dir="ltr">Hi David,<div><br></div><div>In case you don't want to ask on the ol3-dev list, a quick answer is that ol3 works in resolutions (map units per pixel, e.g. meters per pixel or degrees per pixel). You should be able to directly use this value for the MapGuide source.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">A couple of comments:</div><div class="gmail_extra" style>- scale is 1/resolution, but, from my understanding of reading the MapGuide specs, the SETVIEWSCALE parameter has an implicit reciprocal so you really should pass the resolution; ol3 works with resolutions so this should be fairly straightforward (i.e. no need for getScaleFromResolution or getResolutionFromScale functions)</div>
<div class="gmail_extra" style>- the MapGuide HTTP API seems to be functionally similar to WMS, please look at the WMS code (in src/ol/source/*wmssource.js) for inspiration!</div><div class="gmail_extra" style>- in ol3, tiled sources (like WMTS, tiled WMS, OSM, etc.) inherit from a different base class to image sources (e.g. single image WMS). This means that whereas as in OL2 you'd write singleTile = true/false in ol3 you'd use different classes (that can still share common code)</div>
<div class="gmail_extra" style><br></div><div class="gmail_extra" style>Hope this helps for a starter,</div><div class="gmail_extra" style>Tom</div><div class="gmail_extra"><br><div class="gmail_quote">On 18 April 2013 16:57, Tom Payne <span dir="ltr"><<a href="mailto:tom.payne@camptocamp.com" target="_blank">tom.payne@camptocamp.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi David,<div><br></div><div>Best to ask this question on the ol3-dev list:</div><div>  <a href="https://groups.google.com/forum/?fromgroups=#!forum/ol3-dev" target="_blank">https://groups.google.com/forum/?fromgroups=#!forum/ol3-dev</a></div>

<div><br></div><div>Regards,</div><div>Tom</div><div><br></div></div><div class="gmail_extra"><div><div class="h5"><br><br><div class="gmail_quote">On 18 April 2013 15:59, David Hequet <span dir="ltr"><<a href="mailto:david.hequet@free.fr" target="_blank">david.hequet@free.fr</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm currently using OL2 with Mapguide layers.<br>
<br>
Since OL3 is coming i want to contribute by adding MapGuide source for<br>
singleimage and tiledimage layer.<br>
<br>
As mapguide massively use scales (you request single image with  center,<br>
width, height and scale ,<br>
<a href="http://trac.osgeo.org/mapguide/wiki/HttpApi/RenderingService#GetMapImage" target="_blank">http://trac.osgeo.org/mapguide/wiki/HttpApi/RenderingService#GetMapImage</a> ) i<br>
wonder if there are helper like ol2's getScaleFromResolution or<br>
getResolutionFromScale that can be good starting point for me.<br>
<br>
thank you<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/OL3-adding-mapguide-source-tp5047985.html" target="_blank">http://osgeo-org.1560.x6.nabble.com/OL3-adding-mapguide-source-tp5047985.html</a><br>
Sent from the OpenLayers Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Dev mailing list<br>
<a href="mailto:Dev@lists.osgeo.org" target="_blank">Dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br>Camptocamp SA<br>Tom PAYNE<br>PSE A<br>CH-1015 Lausanne<br><br><a href="tel:%2B41%2021%20619%2010%2013" value="+41216191013" target="_blank">+41 21 619 10 13</a> (direct)<br>
<a href="tel:%2B41%2021%20619%2010%2010" value="+41216191010" target="_blank">+41 21 619 10 10</a> (centrale)<br><a href="tel:%2B41%2021%20619%2010%2000" value="+41216191000" target="_blank">+41 21 619 10 00</a> (fax)<br>

</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Camptocamp SA<br>Tom PAYNE<br>PSE A<br>CH-1015 Lausanne<br><br>+41 21 619 10 13 (direct)<br>+41 21 619 10 10 (centrale)<br>+41 21 619 10 00 (fax)<br>
</div></div>