Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 53755

the term is used in a wide number of contexts for an image, picture, or representation;

3 votes

How to create proportional symbol map in Leaflet using default icons?

When you change the properties of L.Icon.Default, you change those for all default icons, not for just the next default icon. … L.marker([lat,lon], { rotationAngle: degrees, icon: L.icon({ iconSize: [(6*value),(10*value)] }) }).addTo(map); } Also, do read the custom icons tutorial, as it explains this technique …
IvanSanchez's user avatar
  • 10.3k
3 votes

Alter Leaflet L.Icon.Default

Let me quote the Leaflet documentation: In order to change the default icon, just change the properties of L.Icon.Default.prototype.options (which is a set of Icon options). …
IvanSanchez's user avatar
  • 10.3k
3 votes

absolute paths don't work for my leaflet custom icons

URLs must have a scheme (also called protocol). In most cases, the scheme is http:// or https://. If you do not specify a scheme, a browser will interpret that as a relative path, resolving it with th …
IvanSanchez's user avatar
  • 10.3k
1 vote

Variable iconUrl in Leaflet, use GEOJson property voor iconUrl definition (Leaflet)

The second parameter to your function clickFeature(e, feature) {...} function is always undefined. This happens because Leaflet event handler functions are expected to receive just one parameter (the …
IvanSanchez's user avatar
  • 10.3k
2 votes

DivIcon vertical text

reliable (and easier) way to have "vertical text" is to use the writing-mode CSS property, like so: /* CSS */ .vertical-text { writing-mode: vertical-rl; } // JS var marker = L.marker([0, 0], { icon
IvanSanchez's user avatar
  • 10.3k
8 votes
Accepted

Custom marker based on geojson attribute in Leaflet

This is wrong: var icon= L.icon.glyph({ prefix: '', glyph: feature.properties.id, // Any other icon options here }); var geoJsonLayer = L.geoJSON(featureCollection, { pointToLayer: function(feature … , latlng) { return L.marker(latlng, {icon: icon}) } }); And this is right (note the variable scope for feature and thus feature.properties.id: var geoJsonLayer = L.geoJSON(featureCollection, { …
IvanSanchez's user avatar
  • 10.3k