|
@@ -1,67 +1 @@
|
|
|
-æ ¹æ�® plan-request 产生 amap 的图形
|
|
|
|
|
-
|
|
|
|
|
-//获�selector
|
|
|
|
|
-export function getShapesSelector(airspaceInfos, setStyle, currentAirspaceIndex) {
|
|
|
|
|
- currentAirspaceIndex = currentAirspaceIndex ? currentAirspaceIndex : () => -1;
|
|
|
|
|
- let circles = getCircleSelector(airspaceInfos, setStyle, currentAirspaceIndex);
|
|
|
|
|
- let lineAndMarkers = getLineAndMarkerSelector(airspaceInfos, setStyle, currentAirspaceIndex);
|
|
|
|
|
- let lines = getLineSelector(lineAndMarkers);
|
|
|
|
|
- let polygonAndMarkers = getPolygonAndMarkerSelector(airspaceInfos, setStyle, currentAirspaceIndex);
|
|
|
|
|
- let polygons = getPolygonSelector(polygonAndMarkers);
|
|
|
|
|
- let markers = getMarkerSelector(polygonAndMarkers, lineAndMarkers);
|
|
|
|
|
- let regionPoints = getRegionPointsSelector(circles, lineAndMarkers, polygonAndMarkers);
|
|
|
|
|
- return {
|
|
|
|
|
- markers,
|
|
|
|
|
- circles,
|
|
|
|
|
- lines,
|
|
|
|
|
- polygons,
|
|
|
|
|
- regionPoints
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-//获�数组
|
|
|
|
|
-export function getShapes(airspaceInfos, setStyle, currentAirspaceIndex) {
|
|
|
|
|
- currentAirspaceIndex = currentAirspaceIndex ? currentAirspaceIndex : () => -1;
|
|
|
|
|
- let circles = getCircles(airspaceInfos, setStyle, currentAirspaceIndex);
|
|
|
|
|
- let lineAndMarkers = getLinesAndMarkers(airspaceInfos, setStyle, currentAirspaceIndex);
|
|
|
|
|
- let lines = getLines(lineAndMarkers);
|
|
|
|
|
- let polygonAndMarkers = getPolygonsAndMarkers(airspaceInfos, setStyle, currentAirspaceIndex);
|
|
|
|
|
- let polygons = getPolygons(getPolygonsAndMarkers);
|
|
|
|
|
- let markers = getMarkers(polygonAndMarkers, lineAndMarkers);
|
|
|
|
|
- let regionPoints = getRegionPoints(circles, lineAndMarkers, polygonAndMarkers);
|
|
|
|
|
- return {
|
|
|
|
|
- markers,
|
|
|
|
|
- circles,
|
|
|
|
|
- lines,
|
|
|
|
|
- polygons,
|
|
|
|
|
- regionPoints
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-//å…¶ä¸currentAirspaceIndex没有å�¯ä»¥ä¸�ä¼ ,setStyle为方法,需è¦�为æ¯�个shapeè®¾ç½®æ ·å¼�,实例如下:
|
|
|
|
|
-
|
|
|
|
|
-function setStyle(shapeName) {
|
|
|
|
|
- if ('circle' === shapeName) {
|
|
|
|
|
- return {
|
|
|
|
|
- lineWidth:2,
|
|
|
|
|
- strokeColor:'#123',
|
|
|
|
|
- fillColor:'#123'
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if ('line' === shapeName) {
|
|
|
|
|
- return {
|
|
|
|
|
- lineWidth:2,
|
|
|
|
|
- strokeColor:'#123',
|
|
|
|
|
- imageName:'BA_oval' // marker's name
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if ('polygon' === shapeName) {
|
|
|
|
|
- return {
|
|
|
|
|
- lineWidth:2,
|
|
|
|
|
- strokeColor:'#123',
|
|
|
|
|
- fillColor:'#123',
|
|
|
|
|
- imageName:'BA_oval' // marker's name
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return {};
|
|
|
|
|
-}
|
|
|
|
|
|
|
+¦V§ê®zËZ™ªþÇ¥yËhìi¢»_ºw-ЉàzÔ¡j—¬Ié^rÚ+j*쥧"wè²ÇJÜ¥yË«éí*쥧"w^ÅË«éí*쥧"w^ÅË«éí*쥧"w^ÅË«éí*쥧"w^ÇY^µÈ«rW¬�ëBŠ·%y'¥yËh¨«²–œx‰ß¢Ëµ+r•ç.®·§´«²–œx‰Ý{^¶X§x Ý1ªäz»
|