1

I made a globe map with react-simple-maps, did my best to optimize the rendering but still slow with complex json.

steps to reproduce

  1. drag/zoom the globe, check performance
  2. change top radio input to regions (more complex json)
  3. drag/zoom the globe (if you can)

how to avoid 'out of screen rendering'?

is there anyway to improve rendering performance while dragging the globe?

my last try:

export function useCameraCenterDistance() {
  const {
    center: [x, y],
  } = useCameraContext()
  return useCallback(
    (point: Coord) => {
      const distance = getDistance([x, y], point)
      return reflect(distance, 180)
    },
    [x, y]
  )
}
  • i've changed map data to lighter geojson, but still not able to avoid 'out of screen rendering' – Jimi Gaspar Sep 30 '21 at 17:04
  • got some optimization progress from react dispatches and choosing a lighter topojson,. but Mongolia still missing https://gitlab.com/gaushao/react-simple-map-globe/-/issues/2#note_694161455 – Jimi Gaspar Oct 04 '21 at 16:56

0 Answers0