This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Online Maps with OpenLayers

My recent threads

You haven't posted any discussions yet.

Recently updated threads

openlayers vector-format example shows two maps

Go back to: General discussion

I'm baffled. I was planning on using http://openlayers.org/dev/examples/vector-formats.html to help create the 33 Playcentre regions. I wanted to download it, enlarge the map and centre it on NZ. When I download it and run it locally I get two maps, a second one appears directly underneath the first, although the navigation icons have lost the images. I took a chance and changed the long/lat in the only map.center I could find to Wgtn and that didn't get me to NZ either.

I'll read the example more carefully and work on my own version. That's ok, But why I am getting two maps?

intro vert's picture
intro vert
Tue, 2011-03-15 09:39

Ok, I see that I had left the zoom level too low.
But still have two maps.

intro vert's picture
intro vert
Tue, 2011-03-15 11:39

I do have a way to get the geometry of what I draw. But I can't enclose the regions unless I have the geometry for the coastline. How do I get that?

Nick Doiron's picture
Nick Doiron
Thu, 2011-03-17 03:59

If you still have this problem, can you post a link? Also, I think you could download the coastline points if you are able to find its ID in the editor.

On the page http://www.openstreetmap.org/api/0.6/way/7578440 , press Ctrl+U and you can see a sample way. Replace the last number with the coastline's ID.

intro vert's picture
intro vert
Thu, 2011-03-17 11:54

thanks Nick, but I don't understand what I should be seeing at the link. I get an xml file. On the bright side, I believe I understand the process that I need to follow to get what I want.

Nick Doiron's picture
Nick Doiron
Thu, 2011-03-17 22:15

Lets say you have a coastline that you want to use. In JOSM or Potlatch, you can select that coastline, view OpenStreetMap's ID for that line, and use that in place of the line ID in that URL. Then you'll have an XML file of points that you can use.