Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to add a custom marker to my demo:

Instead, I had to make a red dot to specify the place I wanted. Adding an image seems to want to layer that, but all I want is to stick the center of an icon to a lon/lat I specify.

On the same topic, is there any other way to put a point on the map than setting up a geoJSON with geometry set to point. This seemed counterintuitive, but was the only way I could figure it out with just the docs and demo to go buy.

share|improve this question
up vote 2 down vote accepted

The easy way to add features to a map in Polymaps is via GeoJSON. You can then use Javascript to go in and modify the mark: here's a working example of simple image replacement. Basically the code replaces the GeoJSON circles with svg:image tags.

It's also possible to directly add things to the Polymaps SVG structure in your own code. You will want to use the Polymaps method locationPoint() to translate lat/lon to screen coordinates. This works great until you need to move or zoom the map; it's a bit of a challenge to implement move handling correctly. A third option is to build a custom po.layer(), see the tiles example.

share|improve this answer
Yay! Extremely helpful! Thanks! :-) – Till May 6 '11 at 11:53
(3+ years ago, but).. What did you find difficult with move handling? I've added an SVG layer that moves and zooms with the map, and once I knew how to insert it (please ask) all event handling seems to happen automatically correctly. No custom handlers were required. – akauppi Nov 3 '14 at 7:26
I'm not sure I recall, but I suspect it is loading and paging new objects that were not visible. If you just draw all the objects offscreen you wouldn't have to worry about that. Polymaps is end of life, btw, you should probably switch to something newer like Leaflet. – Nelson Nov 4 '14 at 16:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.