Support » Plugin: amCharts: Charts and Maps » Open links in new window

Viewing 7 replies - 1 through 7 (of 7 total)
  • Update:

    I guess this function is loading a new page when the map is clicked:

    map.addListener(“clickMapObject”, function (event) {
    $.fancybox({
    href: event.mapObject.modalUrl,
    title : event.mapObject.title,
    type: “iframe”
    });
    });

    I guess ‘type: iframe’ is opening the page, but it loads on an iframe instead of a new window/tab

    Plugin Author martynasma

    (@martynasma)

    Thanks! I tried:

    var map = AmCharts.makeChart(“chartdiv “,{
    “dataProvider”: {
    “urlTarget”: “_top”
    }
    });

    But it still opens on an iframe.

    By the way, I’m using these resources:

    <script src=”http://www.amcharts.com/lib/3/ammap.js”></script>
    <script src=”http://www.amcharts.com/lib/3/maps/js/spainProvincesLow.js”></script>
    <script src=”http://www.amcharts.com/lib/3/ammap_amcharts_extension.js”></script>
    <script src=”http://www.amcharts.com/lib/3/amcharts.js”></script>

    Plugin Author martynasma

    (@martynasma)

    “urlTarget” is supposed to go into specific area’s definition, I.e.:

    "dataProvider": {
      "areas": [
        { "id": "FR", url: "http://www.google.fr/", "urlTarget": "_top" }
      ]
    }

    Thanks, but it still opens on an inframe:

    “dataProvider”: {
    “map”: “spainProvincesLow”,
    “areas”: [{
    id: “ES-A”,
    modalUrl: “http://nueva.publidirecta.com/buzoneo-alicante”,
    selectable: true, “urlTarget”: “_blank”
    },
    ….

    (tried with _blank and _top).

    Plugin Author martynasma

    (@martynasma)

    JavaScript Maps does not understand area parameter “modalUrl”. It should be “url”:

    "dataProvider": {
      "map": "spainProvincesLow",
      "areas": [{
        id: "ES-A",
        modalUrl: "http://nueva.publidirecta.com/buzoneo-alicante",
        selectable: true,
        "urlTarget": "_blank"
      },
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Open links in new window’ is closed to new replies.