Hi David, 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.
A couple of comments: - 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) - 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! - 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) Hope this helps for a starter, Tom On 18 April 2013 16:57, Tom Payne <tom.pa...@camptocamp.com> wrote: > Hi David, > > Best to ask this question on the ol3-dev list: > https://groups.google.com/forum/?fromgroups=#!forum/ol3-dev > > Regards, > Tom > > > > On 18 April 2013 15:59, David Hequet <david.heq...@free.fr> wrote: > >> Hi, >> >> I'm currently using OL2 with Mapguide layers. >> >> Since OL3 is coming i want to contribute by adding MapGuide source for >> singleimage and tiledimage layer. >> >> As mapguide massively use scales (you request single image with center, >> width, height and scale , >> http://trac.osgeo.org/mapguide/wiki/HttpApi/RenderingService#GetMapImage) i >> wonder if there are helper like ol2's getScaleFromResolution or >> getResolutionFromScale that can be good starting point for me. >> >> thank you >> >> >> >> >> >> >> >> -- >> View this message in context: >> http://osgeo-org.1560.x6.nabble.com/OL3-adding-mapguide-source-tp5047985.html >> Sent from the OpenLayers Dev mailing list archive at Nabble.com. >> _______________________________________________ >> Dev mailing list >> d...@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/openlayers-dev >> > > > > -- > Camptocamp SA > Tom PAYNE > PSE A > CH-1015 Lausanne > > +41 21 619 10 13 (direct) > +41 21 619 10 10 (centrale) > +41 21 619 10 00 (fax) > -- Camptocamp SA Tom PAYNE PSE A CH-1015 Lausanne +41 21 619 10 13 (direct) +41 21 619 10 10 (centrale) +41 21 619 10 00 (fax)
_______________________________________________ Dev mailing list d...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-dev