react-globe icon indicating copy to clipboard operation
react-globe copied to clipboard

Is there anyway to change a markers height offset from the marker renderer options?

Open jabusir opened this issue 5 years ago • 2 comments

Is it possible to create two layers with this by placing two markers at the same location, but elevating one above the other?

jabusir avatar Sep 23 '20 19:09 jabusir

@jabusir, this is not supported (markerOffsetRadiusScale applies to all markers but not individual markers). It might be possible for me to read this property on each marker and use it as a override to the value set in options, but probably not willing to support this unless it's more broadly needed.

Feel free to fork the repo and adjust this for your needs if it works out!

Another potential option is to render custom markers options.markerRenderer. The globe will help you place markers in the appropriate places, but you can control rendering using a custom renderer. You probably have to do some trigonometry on your side to determine how to place the marker at a specific elevated height.

chrisrzhou avatar Sep 25 '20 05:09 chrisrzhou

Hi Chris,

Thank you for your response. That was really insightful.

Also had another question, hope you don't mind me dropping it here, but can globeBackgroundTexture and other textures be set to assets that are on my machine or do the assets have to be hosted on the web. Thanks again :)

jabusir avatar Sep 28 '20 20:09 jabusir