제가 해결 한 것 같습니다.
우선 측지 옵션을 추가 했으므로 사용자는 측지 대책을 원한다면 선택할 수 있습니다. I이 유용 희망
"getComp"
var ppdu = OpenLayers.DOTS_PER_INCH * system.inches[unitIndex]
/this.getGeodesicRatio()/this.scale;
"setSubPros"
var ppdu = OpenLayers.DOTS_PER_INCH * system.inches[unitIndex]
/this.getGeodesicRatio()/this.scale;
: I는 다른 기능의 측지선 비율 삽입
getGeodesicRatio: function() {
var res = this.map.getResolution();
if (!res) {
return;
}
var curMapUnits = this.map.getUnits();
var inches = OpenLayers.INCHES_PER_UNIT;
// convert maxWidth to map units
var maxSizeData = this.maxWidth * res * inches[curMapUnits];
var geodesicRatio = 1;
if(this.geodesic) {
var maxSizeGeodesic = (this.map.getGeodesicPixelSize().w ||
0.000001) * this.maxWidth;
var maxSizeKilometers = maxSizeData/inches["km"];
geodesicRatio = maxSizeGeodesic/maxSizeKilometers;
}
return geodesicRatio;
},
셋째
둘째, I합니다 (ScaleLine 기준)이 기능을 만들었다.
왜 downvote? O.o – joaorodr84
그게 openlayers 2 였을 것 같습니까? – alfonx
예, OpenLayers 2였습니다. – joaorodr84