Skip to content

Markers fail to render for albersUSA #79

Closed
@itsjoekent

Description

@itsjoekent

The following throws an error on my map when using AlbersUSA projection,

              {events.map(event => {
                const marker = {
                  coordinates: event.geoLocation,
                  name: event.title,
                };

                return (
                  <Marker marker={marker} key={event.id}>
                    <circle cx={0} cy={0} r={10} />
                  </Marker>
                );
              })}

The error happens because it's calling clipAngle on the projection but clipAngle doesn't exist,

const isGlobe = projection.clipAngle() === degrees

I was able to change the compiled src,

var isGlobe = projection.clipAngle() === degrees;

to

var isGlobe = false;

and the markers successfully rendered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions