-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PloyPoint问题 #590
Comments
感谢提出issue! 关于第1个问题,你是指maptalks绘制的有错误吗?方便的话请提供一下重现代码,只看图无法定位问题,可以在这个jsfiddle基础上修改: |
[[1509.01,336.83434,10],[1562.82,336.83434,10],[1562.82,341.54434000000003,10],[1731.42,341.54434000000003,10],[1738.57,349.49434,10],[1810.15,349.49434,10],[1817.04,340.74434,10],[1836.39,340.74434,10],[1836.39,351.88434,10],[1902.66,351.88434,10],[1902.66,337.30434,10],[2010.29,337.30434,10],[2069.67,337.30434,10],[2069.67,413.96434,10],[2069.4,463.57434,10],[2043.69,463.57434,10],[2043.69,468.78434000000004,10],[2069.93,468.78434000000004,10],[2069.93,538.23434,10],[2043.69,538.23434,10],[2043.69,543.80434,10],[2069.67,543.80434,10],[2069.67,544.86434,10],[2098.03,544.86434,10],[2098.03,517.29434,10],[2125.6,517.29434,10],[2125.6,512.52434,10],[2098.56,512.52434,10],[2098.56,444.66434000000004,10],[2125.6,444.66434000000004,10],[2125.6,439.35434,10],[2098.73,439.42434000000003,10],[2098.73,425.64434,10],[2098.63,370.09434,10],[2098.56,321.66434000000004,10],[2125.87,321.66434000000004,10],[2125.87,316.35434,10],[2098.3,316.35434,10],[2098.3,313.17434000000003,10],[1965.75,313.17434000000003,10],[1965.75,285.60434000000004,10],[1974.5,276.86434,10],[1965.22,267.84434,10],[1581.64,267.84434,10],[1572.63,277.12434,10],[1581.64,286.40434,10],[1581.64,308.67434000000003,10],[1572.37,308.67434000000003,10],[1565.21,317.68434,10],[1509.01,317.75434,10],[1509.01,336.83434,10]] |
var map = new maptalks.Map('map', {
center: [1063, 273.59717],
zoom: 1,
spatialReference: {
projection: 'EPSG:4326'
},
});
var polygon = new maptalks.Polygon([
[
[1509.01, 336.83434, 10],
[1562.82, 336.83434, 10],
[1562.82, 341.54434000000003, 10],
[1731.42, 341.54434000000003, 10],
[1738.57, 349.49434, 10],
[1810.15, 349.49434, 10],
[1817.04, 340.74434, 10],
[1836.39, 340.74434, 10],
[1836.39, 351.88434, 10],
[1902.66, 351.88434, 10],
[1902.66, 337.30434, 10],
[2010.29, 337.30434, 10],
[2069.67, 337.30434, 10],
[2069.67, 413.96434, 10],
[2069.4, 463.57434, 10],
[2043.69, 463.57434, 10],
[2043.69, 468.78434000000004, 10],
[2069.93, 468.78434000000004, 10],
[2069.93, 538.23434, 10],
[2043.69, 538.23434, 10],
[2043.69, 543.80434, 10],
[2069.67, 543.80434, 10],
[2069.67, 544.86434, 10],
[2098.03, 544.86434, 10],
[2098.03, 517.29434, 10],
[2125.6, 517.29434, 10],
[2125.6, 512.52434, 10],
[2098.56, 512.52434, 10],
[2098.56, 444.66434000000004, 10],
[2125.6, 444.66434000000004, 10],
[2125.6, 439.35434, 10],
[2098.73, 439.42434000000003, 10],
[2098.73, 425.64434, 10],
[2098.63, 370.09434, 10],
[2098.56, 321.66434000000004, 10],
[2125.87, 321.66434000000004, 10],
[2125.87, 316.35434, 10],
[2098.3, 316.35434, 10],
[2098.3, 313.17434000000003, 10],
[1965.75, 313.17434000000003, 10],
[1965.75, 285.60434000000004, 10],
[1974.5, 276.86434, 10],
[1965.22, 267.84434, 10],
[1581.64, 267.84434, 10],
[1572.63, 277.12434, 10],
[1581.64, 286.40434, 10],
[1581.64, 308.67434000000003, 10],
[1572.37, 308.67434000000003, 10],
[1565.21, 317.68434, 10],
[1509.01, 317.75434, 10],
[1509.01, 336.83434, 10]
]
], {
visible: true,
editable: true,
cursor: 'pointer',
shadowBlur: 0,
shadowColor: 'black',
draggable: false,
dragShadow: false, // display a shadow during dragging
drawOnAxis: null, // force dragging stick on a axis, can be: x, y
symbol: {
'lineColor': '#34495e',
'lineWidth': 2,
'polygonFill': 'rgb(135,196,240)',
'polygonOpacity': 0.6
}
});
new maptalks.VectorLayer('vector', polygon).addTo(map); |
收到。 var map = new maptalks.Map('map', {
center: [1509.01,336.83434],
zoom: 1,
spatialReference : {
//改为基于像素坐标的identity投影
projection : 'identity',
//可以根据需要增加更多的resolution (缩放级别)
resolutions : [
2, 1, 0.5
],
fullExtent : {
top : 10000,
bottom : -10000,
left : -10000,
right : 10000
}
}
}); |
OK.已经设置了。正常显示了。 |
下个版本支持移动端手势的能规划么?什么时候能发版? |
解决就好! 报错是因为spatialReference缺resolutions和fullExtent导致的。不过你提醒我了,应该给identity投影提供默认的设置。 maptalks 4326 不能正常显示应该是因为maptalks对anti-meridian的自动处理逻辑导致(如何处理线在地球球体上的两种绘制模式)。ol和leaflet没这个逻辑,所以绘制是正确的。原则上4326的输入应该还是经纬度。 手势应该在1到2周内会实现发布。 |
resolutions 应该根据minZoom和MaxZoom 以及每次的变化的步长提供默认值,每次更改最小和最大都应该做出相应的改变 |
已添加,参见:8aaf49f |
maptalks's version and what browser you use?
这个是使用maptalks.js绘制完成显示的多边形
这个是使用openlayer绘制完成显示的多边形,
数据使用的是一份数据
还有,咱们的 maptalks.js不支持移动端的手势旋转操作么��
Issue description
Please provide a reproduction URL (on any jsfiddle like site)
The text was updated successfully, but these errors were encountered: