[mapguide-users] Mapguide & Openlayers 3.12.1 Displaydpi for mobile/tablet devices

swimming123 allen.song at altusgroup.com
Mon Feb 1 13:42:30 PST 2016


I feel it's big challenging for MapGuide switch from OpenLayer2 to
OpenLayers3. Let's look at the API documnets: 
In OpenLayers2, OpenLayers.Layer.MapGuide constructor can accept params
including mapDefinition, locale, mapName, session, basemaplayergroupname,
format, showLayers, hideLayers, showGroups, hideGroups and selectionXml. So
you can pass these parameters and manipulate your MapGuide instance; seeAPI
doc:
http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/MapGuide-js.html.

However OpenLayers 3 design and re-write from scratch, MapGuide instance is
ol.source.ImageMapGuide,  it extend from ol.source.Image(version2 from
OpenLayers.Layer), it accept a params object including ol.Extent, ol.Size, 
metersPerUnit, dpi ; see api doc:
http://openlayers.org/en/v3.0.0/apidoc/ol.source.ImageMapGuide.html.  I read
the source code, I think probably to use this
ol.source.ImageMapGuide.prototype.updateParams or try  using ol._params_ to
pass parameters. Myself haven't try yet, will try once I feel more familiar
with OpenLayers 3.

So OpenLayers3 is not even similar with OpenLayer2,  as MapGuide
users/developers, there are a huge step need to take forward because
OpenLayers 2.X will not going to develop further after Year2013 due to it
aging of JavaScript. Move to OpenLayers3.X basically also need re-design and
re-write from scratch.



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-Openlayers-3-12-1-Displaydpi-for-mobile-tablet-devices-tp5247003p5248388.html
Sent from the MapGuide Users mailing list archive at Nabble.com.


More information about the mapguide-users mailing list