Merge branch 'heatmap-fix' into 'master'

fix(Amap): fix map

添加高德地图参数

See merge request !17
This commit is contained in:
thinkinggis 2019-03-20 17:25:24 +08:00
commit f6592552a6
3 changed files with 1924 additions and 19 deletions

1905
demos/index.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -6,4 +6,6 @@ void main(){
float intensity = texture2D(u_texture,v_uv).r; float intensity = texture2D(u_texture,v_uv).r;
vec4 color = texture2D(u_colorRamp,vec2(0.5,1.0-intensity)); vec4 color = texture2D(u_colorRamp,vec2(0.5,1.0-intensity));
gl_FragColor = color; gl_FragColor = color;
gl_FragColor.a = color.a * smoothstep(0.,0.05,intensity);
} }

View File

@ -126,38 +126,36 @@ export default class GaodeMap extends Base {
scene.getZoom = () => { scene.getZoom = () => {
return map.getZoom(); return map.getZoom();
}; };
scene.setZoom = () => { scene.setZoom = zoom => {
return map.setZoom(); return map.setZoom(zoom);
}; };
scene.setBounds = () => { scene.setBounds = extent => {
return map.setBounds(); return map.setBounds(new AMap.Bounds([ extent[0], extent[1] ], [ extent[2], extent[3] ]));
}; };
scene.setRotation = () => { scene.setRotation = rotation => {
return map.setRotation(); return map.setRotation(rotation);
}; };
scene.zoomIn = () => { scene.zoomIn = () => {
return map.zoomIn(); return map.zoomIn();
}; };
scene.setRotation = () => {
return map.setRotation();
};
scene.zoomOut = () => { scene.zoomOut = () => {
return map.zoomOut(); return map.zoomOut();
}; };
scene.panTo = () => { scene.panTo = lnglat => {
return map.panTo(); return map.panTo(new AMap.LngLat(lnglat[0], lnglat[1]));
}; };
scene.panBy = () => { scene.panBy = (x, y) => {
return map.panBy(); return map.panBy(x, y);
}; };
scene.setPitch = () => { scene.setPitch = pitch => {
return map.setPitch(); return map.setPitch(pitch);
}; };
scene.pixelToLngLat = () => { scene.pixelToLngLat = pixel => {
return map.pixelToLngLat(); const ll = new AMap.Pixel(pixel[0], pixel[1]);
return map.pixelToLngLat(ll);
}; };
scene.lngLatToPixel = () => { scene.lngLatToPixel = lnglat => {
return map.lngLatToPixel(); return map.lngLatToPixel(new AMap.LngLat(lnglat[0], lnglat[1]));
}; };
scene.setMapStyle = style => { scene.setMapStyle = style => {
return map.setMapStyle(style); return map.setMapStyle(style);