File tree Expand file tree Collapse file tree
layers/src/point/shaders/fillImage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,10 @@ export const fillImage: TestCase = async (options) => {
1212 } ,
1313 } ) ;
1414
15+ await scene . addImage (
16+ 'car' ,
17+ 'https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*AtZnTYIlkbwAAAAAQGAAAAgAemJ7AQ/original' ,
18+ ) ;
1519 await scene . addImage (
1620 'marker' ,
1721 'https://gw.alipayobjects.com/mdn/antv_site/afts/img/A*BJ6cTpDcuLcAAAAAAAAAAABkARQnAQ' ,
@@ -23,7 +27,7 @@ export const fillImage: TestCase = async (options) => {
2327 {
2428 lng : 120 ,
2529 lat : 30 ,
26- name : 'marker ' ,
30+ name : 'car ' ,
2731 } ,
2832 ] ,
2933 {
@@ -35,9 +39,9 @@ export const fillImage: TestCase = async (options) => {
3539 } ,
3640 )
3741 . style ( {
38- unit : 'meter' ,
42+ rotation : 0 ,
3943 } )
40- . shape ( 'marker ' )
44+ . shape ( 'car ' )
4145 . size ( 36 ) ;
4246
4347 const pointLayer2 = new PointLayer ( { layerType : 'fillImage' } )
@@ -58,10 +62,10 @@ export const fillImage: TestCase = async (options) => {
5862 } ,
5963 )
6064 . shape ( 'marker' )
61- . size ( 36 )
65+ . size ( 20 )
6266 . active ( true )
6367 . style ( {
64- rotation : 90 ,
68+ rotation : 0 ,
6569 } ) ;
6670
6771 scene . addLayer ( pointLayer ) ;
Original file line number Diff line number Diff line change 2929 }
3030 </ style >
3131 < script >
32+ window . forceWebGL = true
3233 window . _AMapSecurityConfig = {
3334 securityJsCode : '290ddc4b0d33be7bc9b354bc6a4ca614' ,
3435 } ;
3536 </ script >
36- < script src ="https://webapi.amap.com/maps?v=2.0&key=6f025e700cbacbb0bb866712d20bb35c "> </ script >
37+ < script src ="https://webapi.amap.com/maps?v=2.0.5 &key=6f025e700cbacbb0bb866712d20bb35c "> </ script >
3738 < script type ="module " src ="./index.tsx "> </ script >
3839 < div id ="root "> </ div >
3940</ html >
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ out float v_opacity;
2323void main() {
2424 vec3 extrude = a_Extrude;
2525 v_uv = (a_Extrude.xy + 1.0 ) / 2.0 ;
26+ v_uv.x = 1.0 - v_uv.x;
2627 v_uv.y = 1.0 - v_uv.y;
2728 v_Iconuv = a_Uv;
2829 v_opacity = opacity;
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import { MapTheme } from './theme';
2222const AMAP_VERSION = '2.0' ;
2323const AMAP_API_KEY = 'f59bcf249433f8b05caaee19f349b3d7' ;
2424const ZOOM_OFFSET = 1 ;
25+ // @ts -ignore 高德地图强制使用 WebGL,否则支付宝端内无法使用
26+ window . forceWebGL = true ;
2527
2628const AMapEventMapV2 : Record < string , string > = {
2729 contextmenu : 'rightclick' ,
You can’t perform that action at this time.
0 commit comments