Hi,
I'm having a empty space while loading my Mapstraction page with the following error message :

ReferenceError: Can't find variable: mxn
http://localhost:8888/xxx/sites/all/modules/mapstraction/mapstraction.dr...

Could anyone tell me what I'm missing?

Thanks in advance,
.sahaj

Comments

levelos’s picture

Status: Active » Fixed

Are you using the latest 6.x-2.x-dev version? This should be fixed in that version. It's actually due to a bug in the Mapstraction library, but a work around was added with the last commit.

dan_metille’s picture

Yes, I'm using the latest 6.x-2.x-dev version.
However I'd installed it 'on the top' of the 6.x-1.0 version.
Should I deinstall and reinstall it?

dan_metille’s picture

Still getting same error after reinstalling the latest 6.x-2.x-dev version.

levelos’s picture

Status: Fixed » Closed (fixed)

Certainly, that's a best practice anytime doing an update. The architecture has completely changed.

levelos’s picture

Sorry, didn't see that last note. I have this working on several production sites without problems, so perhaps it's something unique to your setup. Ideas? Also, what browser are you using?

dan_metille’s picture

I'm mostly using Safari4 on Mac, and the website is for now still running locally only (Mamp 1.8.4).

iTiZZiMO’s picture

im using the last dev version from 23 june and i still get the same error with drupal 6.16, views and google maps , google maps v3 and any other map type.
i build a view with a page and some cck fields and after that i launch the page path in firefox 3.6.3 ubuntu 10.04 and i got this error

Fehler: mxn is not defined
Quelldatei: http://xxx,/sites/all/modules/mapstraction/mapstraction.drupal.js?n
Zeile: 72

and no map is displayed.

this is line 72

// Iterate over each map added to the page
$(Drupal.settings.mapstraction).each(function() {
var map = Drupal.mapstraction[this.mapId] = new mxn.Mapstraction(this.mapId, this.apiName);

when i change the view style to table, i get one result with latitude an longtitute coordinates, so the query seems to be correct
I use also the location module, as well as gmap and gmap location.

levelos’s picture

Did you download the mapstraction javascript library and place it in the module directory? If not, that's most certainly the cause.

iTiZZiMO’s picture

that was the clue! thank you very much, i try to figure out how the marker are displayed.. but this is a another topic
thank you very much for your help!