buche / leaflet-openweathermap

A JavaScript library for including OpenWeatherMap's layers and OWM's current city/station data in leaflet based maps without hassle.
259 stars 132 forks source link

Increase marker transparency #35

Open changbaishan opened 6 years ago

changbaishan commented 6 years ago

My user gives me a feedback that markers on the map block the city names on the map. They also like your markers, they are informative. Would it be possible to increase transparency of the marker and use heavy border to resolve this user issue?

Thanks Yong Liu

buche commented 6 years ago

The markers are highly customizable, but you can write your own markers, too. Please read https://github.com/buche/leaflet-openweathermap#example-with-user-provided-markerpopup-functions-for-current-weather

The cities marker is just the default one, the wind rose marker is one I implemented as an example for my example website. Just use these two as a guideline for your own marker:

Define layer: https://github.com/buche/leaflet-openweathermap/blob/master/example/files/map.js#L266 Event listener for layer: https://github.com/buche/leaflet-openweathermap/blob/master/example/files/map.js#L269 Marker function: https://github.com/buche/leaflet-openweathermap/blob/master/example/file/map.js#L95 Drawing the marker: https://github.com/buche/leaflet-openweathermap/blob/master/example/files/map.js#L109

changbaishan commented 6 years ago

Thanks for the help.

Best regards,

Yong Liu


From: buche notifications@github.com Sent: August 4, 2018 7:39:36 AM To: buche/leaflet-openweathermap Cc: changbaishan; Author Subject: Re: [buche/leaflet-openweathermap] Increase marker transparency (#35)

The markers are highly customizable, but you can write your own markers, too. Please read https://github.com/buche/leaflet-openweathermap#example-with-user-provided-markerpopup-functions-for-current-weather

The cities marker is just the default one, the wind rose marker is one I implemented as an example for my example website. Just use these two as a guideline for your own marker:

Define layer: https://github.com/buche/leaflet-openweathermap/blob/master/example/files/map.js#L266 Event listener for layer: https://github.com/buche/leaflet-openweathermap/blob/master/example/files/map.js#L269 Marker function: https://github.com/buche/leaflet-openweathermap/blob/master/example/file/map.js#L95 Drawing the marker: https://github.com/buche/leaflet-openweathermap/blob/master/example/files/map.js#L109

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/buche/leaflet-openweathermap/issues/35#issuecomment-410440657, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AMGWxH0LCNGReA277fQm3RtN8Ufj75cVks5uNXnogaJpZM4VuMgr.