Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance/ speed with many pins #731

Open
ConnorOnTheWeb opened this issue Jan 29, 2022 · 0 comments
Open

Performance/ speed with many pins #731

ConnorOnTheWeb opened this issue Jan 29, 2022 · 0 comments

Comments

@ConnorOnTheWeb
Copy link

ConnorOnTheWeb commented Jan 29, 2022

Is there anything we can do to speed up our mapbox instance when plotting many pins?

I've got over 2000 pins on this map I'm working on and it's running pretty slow right now. This issue is in both loading and usage, takes a couple seconds to change zoom and open popups.

Template

<client-only>
  <MglMap :mapbox-gl="mapboxgl" :accessToken="accessToken" :mapStyle="mapStyle" :center="centerPoint" :scroll-zoom="false" :zoom="2" @load="stopLoading" style="box-shadow:0px 2px 8px #777">
    <div v-for="(one, idx) in many" :key="idx">
      <MglMarker :coordinates="[some, coords]" :color="!this.isBlue ? '#43a047' : '#1976d2'">
        <MglPopup class="pa-0">
          <div>
            <p>Some text info</p>
          </div>
        </MglPopup>
      </MglMarker>
    </div>
    <MglNavigationControl position="bottom-right" :visualizePitch="false" />
    <MglGeolocateControl position="bottom-right" :showUserLocation="false" :fitBoundsOptions="{ maxZoom:8 }" />
  </MglMap>
</client-only>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant