Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

190
Views
Mapbox-gl-js generate different icons

I use MapBox-GL-JS for display markers in map. In my component I have have prop for markers, which are same (visual), but different number (center of marker icon). Is it possible to generate same icon with different number for display all markers? And how can select correct icon depend on marker ? I know that I can use Marker (out of mapBox canvas) but there is performance issue.

<Map
            style="mapbox://styles/mapbox/streets-v8"
            zoom={[8]}
            containerStyle={{
                height: '100vh',
                width: '100vw'
            }}
            onStyleLoad={this.onMapLoad}
            center={[this.props.markers[0].position!.lat, this.props.markers[0].position!.lng]}
        >
            <Layer type="symbol" id="marker" layout={{ "icon-image": "marker-11", "icon-allow-overlap": true }}>
                {this.props.markers.map((marker) => {
                        return marker.position ? <Feature coordinates={[marker.position.lat,marker.position.lng]} /> : <div>x</div>
                    })}
            </Layer>
        </Map>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!