for (var i = 0; i < array.length; i++) {
}
- Code has to run in old versions of IE.
""" | |
Web Mercator Scale and Resolution Calculations | |
Python implementation of the formulas at http://msdn.microsoft.com/en-us/library/bb259689.aspx | |
""" | |
import math | |
def meters_per_pixel(zoom, lat): | |
""" | |
ground resolution = cos(latitude * pi/180) * earth circumference / map width | |
""" |
Callouts, sometimes called leader lines, are lines between labels and features on a map. They are useful when constraints of space force a label to be moved away from the feature. The callout helps to reconnect the label to the feature it refers to.
There are probably multiple ways to do this, but here is one way using a geometry generator in QGIS 3.x:
colors = ['Red', 'Blue', 'Green', 'Yellow', 'Black'] | |
states = ['Andhra', 'Karnataka', 'TamilNadu', 'Kerala'] | |
neighbors = {} | |
neighbors['Andhra'] = ['Karnataka', 'TamilNadu'] | |
neighbors['Karnataka'] = ['Andhra', 'TamilNadu', 'Kerala'] | |
neighbors['TamilNadu'] = ['Andhra', 'Karnataka', 'Kerala'] | |
neighbors['Kerala'] = ['Karnataka', 'TamilNadu'] |