Hello,
I'm facing the following problem: I'm using prototype.js library on my site (
http://www.prototypejs.org/) which is a pretty well-known JavaScript framework. Unfortunately it seems to be conflicting with the Widget API. Here's an example code:
| <html> |
| <head> |
|
|
| <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"></script> |
| <script type="text/javascript" src="http://www.panoramio.com/wapi/wapi.js?v=1&hl=en"></script> |
|
|
| </head> |
| <body> |
|
|
| <div id="my_widget" ></div> |
| <script type="text/javascript"> |
| var search_rect = {rect: {sw: {lat: 54.158319 , lng: 19.394938}, ne: {lat: 54.158823, lng: 19.395689}}}; |
| var photo_ex_options = {width: 350, height: 200}; |
| var panoramioPhotoWidget = new panoramio.PhotoWidget('my_widget', search_rect, photo_ex_options); |
| panoramioPhotoWidget.setPosition(0); |
| </script> |
|
|
| </body> |
| </html> |
The widget fails to render because of the following error: (this is what Chrome's console displays):
Uncaught SyntaxError: Invalid regular expression: /function each(iterator, context) {
var index = 0;
try {
this._each(function(value) {
iterator.call(context, value, index++);
});
} catch (e) {
if (e != $break) throw e;
}
return this;
}/: Nothing to repeat
Does anyone know a solution?
Thanks,
Olaf