I'm breaking down my question into three parts. I am a beginner to Leaflet and to writing code. Currently, I have a JSON file with all of my markers linked to my map page. The idea is that every marker will have a different image so when the user clicks on the marker the thumbnail for the image will appear in the map, which will link to an image in the website.
Here is an example of a marker in the JSON file:
var mapshs4 = { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 0, "properties": { "idcode": "A", "popupContent": "Here!" + '< img src="thumbnail">' }, "geometry": { "type": "Point", "coordinates": [ -89.2, 22.4 ] } }
أكثر...
Here is an example of a marker in the JSON file:
var mapshs4 = { "type": "FeatureCollection", "features": [ { "type": "Feature", "id": 0, "properties": { "idcode": "A", "popupContent": "Here!" + '< img src="thumbnail">' }, "geometry": { "type": "Point", "coordinates": [ -89.2, 22.4 ] } }
- Is there a way to resize the popup box to the image in the popup of a marker.
- At the same time, I would like the click event to connect to a larger sized image embedded within the site. My guess is that I would have to attach an ID to each image and to each marker to link them together.
- Conversely, how do you make it so that when the user clicks on the image embedded in the site, it will go to that marker on the map? (For an example that uses a label: http://www.theglobeandmail.com/life...in-your-toronto-neighbourhood/article4520994/)
أكثر...