🧪 Version 0.3.1 is our alpha release candidate. Please send us bug reports and suggestions!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

Reference for convert_geo_to_pixel

Convert a geographic location to a pixel coordinate. This is part of the reference section.

Purpose

Convert a longitude / latitude coordinate pair in degrees to sketch coordinates in pixels using the current map view parameters.

Snippet

Convert coordinate a longitude of 1 degrees and latitude of 2 degrees to pixel coordinates using current map view.
x, y = sketch.convert_geo_to_pixel(1, 2)

Parameters

  • longitude: The longitude to convert in degrees.
  • latitude: The latitude to convert in degrees.

Examples

Availability

Available for all platforms.

See also