Fill a feature from Leaflet.js with an image pattern
Budget: $10 – $30 USD
I am looking for a freelancer with experience working with Leaflet.js to design and fill a feature with an image pattern. I have included an example of the desired pattern, which will be used in a gif format and the size of the image pattern should be small.
Use the code at https://leafletjs.com/examples/choropleth/ and add an image to getColor where d is less than 10.
All I'm looking for is some sample javaScript code.
If you want to use a plugin such as https://github.com/bgx1012/leaflet-polygon-fillPattern-canvas that's fine
I don't have a project but I only want sample code. I need to see how it is done. Please only bid if you have done this type of work.
function getColor(d) {
return d > 1000 ? '#800026' :
d > 500 ? '#BD0026' :
d > 200 ? '#E31A1C' :
d > 100 ? '#FC4E2A' :
d > 50 ? '#FD8D3C' :
d > 20 ? '#FEB24C' :
d > 10 ? '#FED976' :
d < 10 ? 'image' :
'#FFEDA0';
}
Use the code at https://leafletjs.com/examples/choropleth/ and add an image to getColor where d is less than 10.
All I'm looking for is some sample javaScript code.
If you want to use a plugin such as https://github.com/bgx1012/leaflet-polygon-fillPattern-canvas that's fine
I don't have a project but I only want sample code. I need to see how it is done. Please only bid if you have done this type of work.
function getColor(d) {
return d > 1000 ? '#800026' :
d > 500 ? '#BD0026' :
d > 200 ? '#E31A1C' :
d > 100 ? '#FC4E2A' :
d > 50 ? '#FD8D3C' :
d > 20 ? '#FEB24C' :
d > 10 ? '#FED976' :
d < 10 ? 'image' :
'#FFEDA0';
}