Lesson goal: Draw with markers

Previous: Place a marker | Home | Next: Find distances

In the lesson on markers, you saw how setmarker could be used to place a famous red Google Markers on a map. We just want to remind you in this lesson, that you have a whole programming language behind you. So instead of one marker, let's draw a whole series of markers on the map.

In this lesson, see if you can draw a marker, every $10^\circ$ (in longitude) around the equator. Hint: the latitude of the equator is $0^\circ$, and the whole world extends from $-180^\circ$ to $180^\circ$ in longitude.

When done, repeat but for every $10^\circ$ in latitude along the Prime Meridian.

Now you try. Fill in some the lat= line and fix the for-loop (in longitude) to draw markers all the way around the globe, along the equator.

Type your code here:


See your results here:

This code will not run! You have to fill in the lat= line, determine a range of longitudes, and figure out what map center you want in the drawmap() line. Dismiss.
Show a friend, family member, or teacher what you've done!

Here is a share link to your code:

Does your code work? Want to run it on your iPhone?

Here's your code:

  1. Use [Control]-[C] (Windows) or [⌘]-[C] (MacOS) to copy your code.

  2. Paste it using [Control]-[V] (Windows) or [⌘]-[V] (MacOS) into this page

  3. Then click the "Use on iPhone" button that you'll see.