• Resolved mizool

    (@mizool)


    hello,

    I am a beginner and I’m looking for how to point an image of the map to a URL link.

    In my code i fix the URL :

    “dataProvider”: {
    “map”: “franceDepartmentsHigh”,
    //”getAreasFromMap”: true,
    “images”: [{
    “svgPath”: targetSVG,
    “zoomLevel”: 5,
    “scale”: 0.5,
    “title”: “La Roche-sur-Yon”,
    “latitude”: 46.6693,
    “longitude”: -1.4187,
    “url”: “https://www.amcharts.com/”,

    But if y clic on image just Zoom on map not URL is launch.

    Have you any idea ?

    Thanks !

    https://www.ads-software.com/plugins/amcharts-charts-and-maps/

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

    (@martynasma)

    Hey,

    Normally, it should be enough to specify the “url” parameter of the MapImage object.

    Can you share your whole map code or a link to the page with it?

    Thread Starter mizool

    (@mizool)

    The full Code

    // svg path for target icon
    var targetSVG = "M9,0C4.029,0,0,4.029,0,9s4.029,9,9,9s9-4.029,9-9S13.971,0,9,0z M9,15.93 c-3.83,0-6.93-3.1-6.93-6.93S5.17,2.07,9,2.07s6.93,3.1,6.93,6.93S12.83,15.93,9,15.93 M12.5,9c0,1.933-1.567,3.5-3.5,3.5S5.5,10.933,5.5,9S7.067,5.5,9,5.5 S12.5,7.067,12.5,9z";
    
    var %CHART% = AmCharts.makeChart("%CHART%", {
    	"type": "map",
        "theme": "light",
        "pathToImages": "https://www.amcharts.com/lib/3/images/",
    
    	"imagesSettings": {
    		"rollOverColor": "#B9121B",
    		"rollOverScale": 3,
    		"selectedScale": 3,
    		"selectedColor": "#B9121B",
    "color":"#B9121B"
    	},
    
    	"dataProvider": {
    		"map": "franceDepartmentsHigh",
          	"getAreasFromMap": true,
    		"images": [{
    			"svgPath": targetSVG,
    			"zoomLevel": 5,
    			"scale": 0.5,
    			"title": "La Roche-sur-Yon",
    			"latitude": 46.6693,
    			"longitude": -1.4187,
                "Url": "https://www.amcharts.com/",
    		}, 		]
    	},
      "areasSettings": {
    		"autoZoom": true,
        	"selectedColor": "#F6E497",
        	"rollOverColor": "#F6E497",
    	},
    
    });

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thanks

    Plugin Author martynasma

    (@martynasma)

    Thanks!

    The “url” property is case-sensitive. You currently have “Url”. Change it to all lowercase “url”.

    Thread Starter mizool

    (@mizool)

    So good it’s OK

    Thank’s thank’s thank’s

    Plugin Author martynasma

    (@martynasma)

    You’re most welcome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘URL in images’ is closed to new replies.