ushahidi / crowdmap-issues

A centralized repository for filing, tracking and discussing bugs and features in Crowdmap.com and Crowdmap's API.
0 stars 2 forks source link

Wrong coordinates format generates JavaScript issues #364

Closed ThomasG77 closed 10 years ago

ThomasG77 commented 10 years ago

Using Firefox 27 on Ubuntu 12.04, I'm unable to connect correctly because of coordinates format in the HTML code. My entry point is https://crowdmap.com/welcome (beta version) and I have only Firebug installed.

What's happened?

I have in my debugger

SyntaxError: missing variable name
[Break On This Error]   

CM_CURR_LAT = 47,2165,

welcome (line 33, col 18)

ReferenceError: root is not defined
[Break On This Error]   

if(root.embeddedMode)

welcome (line 57)
ReferenceError: root is not defined
[Break On This Error]   

...&&e.on("click.tooltipster",function(){""==e.data("tooltipster")||e.data("tooltip...

crowdmap.js (line 4)

In what I see, all the issues I get are related to coordinates format. An excerpt below shows that CM_CURR_LAT and CM_CURR_LON = -1,5524 use a comma instead of a dot

 var root = {}, i18n = {},
CM_ENDPOINT = 'https://api.crowdmap.com/v1',
CM_CURR_LAT = 47,2165,
CM_CURR_LON = -1,5524,
LOCALE = 'fr',
MAP_ID = "null",
USER_ID = "null"; 

As the coma is also the separator between variables, the full block fails and consequently generates the other errors.

evansims commented 10 years ago

Confirmed fixed in forthcoming UI update.