Open zzdoreen opened 3 months ago
<Map enableScrollWheelZoom center={{ lng: 104, lat: 31 }} zoom={10} style={{ height: 800 }}> {/* 地图只展示这个图标 */} <Marker position={{ lng: 104, lat: 31 }} icon={new BMapGL.Icon('/imgs/sprite.png', new BMapGL.Size(40, 40), { imageSize: new BMapGL.Size(1920, 1080), imageOffset: new BMapGL.Size(511, 1036) })} /> {/* 这两个不展示 */} <Marker position={{ lng: 104.1, lat: 31.1 }} icon={new BMapGL.Icon('/imgs/sprite2.png', new BMapGL.Size(40, 40), { imageSize: new BMapGL.Size(1920, 1200), imageOffset: new BMapGL.Size(511, 1036) })} /> <Marker position={{ lng: 104, lat: 31 }} icon={new BMapGL.Icon('/imgs/sprite2.png', new BMapGL.Size(40, 40), { imageSize: new BMapGL.Size(1920, 1200), imageOffset: new BMapGL.Size(511, 1036) })} /> </Map>
把第一个marker注释、后面两个能正常展示
把第一个marker注释、后面两个能正常展示