Hi Carl, I think this should only be done if MapGuide is the base layer, if it is used as an overlay then the DPI probably shouldn't be changed. I think it would be useful to be able to specify per-layer DPI values and have added a ticket (http://trac.openlayers.org/ticket/1768) to OpenLayers trac to open up a discussion on this. The implementation should not be difficult but there may be implications that I am not aware of.
Cheers Paul On 7-Oct-08, at 11:57 AM, Carl wrote: > > > From Openlayers document, it can be found: > > MapGuide OS uses a DPI value and degrees to meters conversion > factor that are different than the defaults used in OpenLayers, so > these > must be adjusted accordingly in your application. See the MapGuide > example > for how to set these values for MGOS. > > From mapguide.html, it can be found: > > var metersPerUnit = 111319.4908; //value returned from mapguide > var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit; > OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit; > OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit; > OpenLayers.DOTS_PER_INCH = 96; > > it seems both OpenLayers.INCHES_PER_UNIT and > OpenLayers.DOTS_PER_INCH are > global settings. > > I doubt if two different layers, such as WMS and MapGuide are added to > Openlayers Map, the above settings will influence both layers. but > it seems > the settings shouldn't be changed for WMS? > > ?? > -- > View this message in context: > http://www.nabble.com/OpenLayers.DOTS_PER_INCH-as-global-setting-seems-shouldn%27t-be-changed-just-for-only-mapguide-layer-while-other-layers-added-together-tp19861382p19861382.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > > _______________________________________________ > Users mailing list > [email protected] > http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
