• Hello.

    On the website all maps are working so far. However, there was an attempt to add map of Iraq and first time there are some strange problems. Map is not visible (only information “JS map by AmCharts” is visible). When I click left mouse button, I will have in the console the following JavaScript errors:

    Uncaught TypeError: Cannot read property 'getBBox' of undefined
        at b.zoomToStageXY (ammap.js?ver=1.1.6:20)
        at b.doDoubleClickZoom (ammap.js?ver=1.1.6:30)
        at b.handleReleaseOutside (ammap.js?ver=1.1.6:18)
        at HTMLDocument.d.handleMouseUp (ammap.js?ver=1.1.6:1)
    Uncaught TypeError: this.smallMap.update is not a function
        at b.updateSmallMap (ammap.js?ver=1.1.6:17)
        at b.handleMouseMove (ammap.js?ver=1.1.6:19)
        at b.handleDocTouchEnd (ammap.js?ver=1.1.6:5)
        at b.handleReleaseOutside (ammap.js?ver=1.1.6:5)
        at b.handleReleaseOutside (ammap.js?ver=1.1.6:17)
        at HTMLDocument.d.handleMouseUp (ammap.js?ver=1.1.6:1)

    The first error is activated only once at the beggining, and the second one is always activated after clicking left mouse button.

    It is strange why only this one map is not working. Can you help?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author martynasma

    (@martynasma)

    Hi Dominik.

    This sounds like a missing map.

    If you are sure the map file is loaded (in Resources tab) and there are no error in console telling loading of such map failed, check if your data correctly refers to the map in dataProvider.

    If that doesn’t help, maybe you can provide a link to a page with your map so that I could check?

    Thread Starter Dominik Kocuj

    (@domko)

    Thank you for your response.

    In “resources” tab is the following text:

    //www.amcharts.com/lib/3/ammap.js
    //www.amcharts.com/lib/3/maps/js/iraqHigh.js

    However, I’ve checked dataProvider in HTML source and it is incorrect. It has a map worldLow instead of iraqHigh. However, I don’t know how can I change it.

    Furthermore, in post with this map, there is no JavaScript code for this, so there is no dataProvider. The dataProvider (but with wrong value) with JavaScript code is only in map preview.

    Please, if you know what is the problem, explain how should I add this map correctly. I think it is important to know that there are many maps on this website and all of them are working correctly and this is first time when such problem exists.

    If you’d like to see it live, the website with this damaged map is here: http://www.kompas.travel.pl/kraje/irak-kurdystan/

    Thank you again.

    EDIT:
    I’ve added the following code to tab JavaScript:

    var $CHART$ = AmCharts.makeChart( "$CHART$", {
      "type": "map",
      "dataProvider": {
        "map": "iraqHigh",
        "getAreasFromMap": true
      },
      "areasSettings": {
        "autoZoom": true,
        "selectedColor": "#CC0000"
      },
      "smallMap": {}
    } );

    and it is working now. However, is it normal procedure to adding this code in all maps which will be created?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘No map and JavaScript errors in console’ is closed to new replies.