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;
vec4 color = texture2D(u_colorRamp,vec2(0.5,1.0-intensity));
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 = () => {
return map.getZoom();
};
scene.setZoom = () => {
return map.setZoom();
scene.setZoom = zoom => {
return map.setZoom(zoom);
};
scene.setBounds = () => {
return map.setBounds();
scene.setBounds = extent => {
return map.setBounds(new AMap.Bounds([ extent[0], extent[1] ], [ extent[2], extent[3] ]));
};
scene.setRotation = () => {
return map.setRotation();
scene.setRotation = rotation => {
return map.setRotation(rotation);
};
scene.zoomIn = () => {
return map.zoomIn();
};
scene.setRotation = () => {
return map.setRotation();
};
scene.zoomOut = () => {
return map.zoomOut();
};
scene.panTo = () => {
return map.panTo();
scene.panTo = lnglat => {
return map.panTo(new AMap.LngLat(lnglat[0], lnglat[1]));
};
scene.panBy = () => {
return map.panBy();
scene.panBy = (x, y) => {
return map.panBy(x, y);
};
scene.setPitch = () => {
return map.setPitch();
scene.setPitch = pitch => {
return map.setPitch(pitch);
};
scene.pixelToLngLat = () => {
return map.pixelToLngLat();
scene.pixelToLngLat = pixel => {
const ll = new AMap.Pixel(pixel[0], pixel[1]);
return map.pixelToLngLat(ll);
};
scene.lngLatToPixel = () => {
return map.lngLatToPixel();
scene.lngLatToPixel = lnglat => {
return map.lngLatToPixel(new AMap.LngLat(lnglat[0], lnglat[1]));
};
scene.setMapStyle = style => {
return map.setMapStyle(style);