Skip to content

map rotate not smooth  #2

@yathu

Description

@yathu

i used this for my project i need a rotate feature i did like this. but it's not smooth please help to resolve this

const panGestureHandler = (event) => { console.log('event', event.nativeEvent); setrotateX(event.nativeEvent.x); setrotateX(event.nativeEvent.y); setTranslateX(-event.nativeEvent.translationX / scale + lastTranslateX); setTranslateY(-event.nativeEvent.translationY / scale + lastTranslateY); };

const projection = d3 .geoAzimuthalEqualArea() .rotate([rotateX, rotateY]) .fitSize([mapExtent, mapExtent], { type: 'FeatureCollection', features: COUNTRIES, }) .clipAngle(clipAngle) .translate([dimensions.width / 2, mapExtent / 2]);

https://stackoverflow.com/questions/65527693/react-native-d3-azimuthal-equal-area-rotate-not-smooth
https://github.com/yathu/react-native-d3-globe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions