TransWikia.com

How do I create a clickable map where clicking on a specific part of the map takes you to a webpage using QGIS?

Geographic Information Systems Asked by Ansh on October 18, 2020

I have a shapefile of regions in Italy. I am creating a travel blog and I want to create a clickable map where when you click one of the regions it takes you to the relevant page for that region. Is there anyway to do this using QGIS? I am also using wix to create the website and I can code in Python if that helps.

Something similar to what is shown here is what I need. You can see for example if you click on the US it takes you to another page.

2 Answers

If you are using a CMS like WIX, there are a lot of javascript libraries that you can use to implement your map fast and easily. For example, amchart has a map component that can be implement using js and you can add click and hover event to the map. If you are not familiar with this, just take a look at its demos.

If you need something more powerful, you can use leaflet to display a map and add some different layers on a based map like open street map outdoor layer which is good for your application. This is an example of leaflet.

Answered by Arash Madadi on October 18, 2020

With qgis2web export leaflet you can create a nice map. But I think, a directly link is not possible. However you need for all regions informations, for example the name of a region. And in addition you can insert hyperlinks to other internet pages. This ist not a problem, because you can insert html within the table. For example: If you insert https://www.berlin.de you can see the clickable link "berlin.de" within the popup of the region/polygon. Now it open a new tab in the browser.

Answered by Jürgen on October 18, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP