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

Icons/markers difficulties

Go back to: General discussion

It's probably something obvious, but I just can't seem to find it. I can't get a second point to show up on my map:
http://jsfiddle.net/rrosso/Kq4Aw/

It looks like I'm doing exactly what is in http://jsfiddle.net/UAxun/70/, but only one point shows up. Any ideas what I'm missing?

Thanks,
Randy

Randy Rosso's picture
Randy Rosso
Thu, 2011-03-10 07:12

Oh, also - my Chrome developer Javascript console is giving me lots of errors/warnings that sound ominous, like:

Unsafe JavaScript attempt to access frame with URL http://jsfiddle.net/rrosso/Kq4Aw/ from frame with URL http://fiddle.jshell.net/rrosso/Kq4Aw/show/. Domains, protocols and ports must match.
fiddle.jshell.net/rrosso/Kq4Aw/show/:58Uncaught TypeError: Object #

has no method 'extent' Unsafe JavaScript attempt to access frame with URL http://jsfiddle.net/rrosso/Kq4Aw/ from frame with URL http://cdn.apture.com/media/html/aptureLoadIframe.html?v=25571374. Domains, protocols and ports must match. Should I be worried about this, or just confused? :)
intro vert's picture
intro vert
Thu, 2011-03-10 11:10

Try changing this
rotatedStyle = OpenLayers.Util.extent( {}, sampleStyle ); //copy sampleStyle and modify
to this
var rotatedStyle = OpenLayers.Util.extend( {}, sampleStyle ); //copy sampleStyle and modify
1) added 'var' and 2) s/extent/extend

Cheers

Randy Rosso's picture
Randy Rosso
Fri, 2011-03-11 03:22

My hero! Thanks for finding my typo - that worked perfectly.