Kapalı

retrieve active element ID for interactive map

Hello -

I am am trying to create an interactive map with Kirby flat file cms system.

The map is svg and the user hovers over the target areas which brings up a tooltip showing the relevant information to that target area.

To show the tooltip I am using the javascript plugin called 'tooltipster' which is setup to show a div with the id "tooltip_content" when hovering over any element with the following attribute: data-tooltip-content="#tooltip_content".

Within this "tooltip_content" div I want information about the target area to pulled from kirby.

The code would normally be:

<?php

$plots = $page->plots()->structure();

// get the one you need, e.g. by name

$plot1 = $plots->findBy('name', '1');

echo $plot1->name()->html();

echo $plot1->price()->html();

?>

But I want it to match the target area like so:

<div id="tooltip_content">

<?php

$plots = $page->plots()->structure();

// get the one you need, e.g. by name

$plot1 = $plots->findBy('name', 'ID_OF_MOUSEOVER_ELEMENT');

echo $plotID_OF_MOUSEOVER_ELEMENT->name()->html();

echo $plotID_OF_MOUSEOVER_ELEMENT->price()->html();

?>

</div>

So in short I want to be able to retreive the ID of the relevant active element (svg group) to show in this tool_tip content div and show the correct information (using jQuery or ajax or any other method you believe is best).

I hope that makes sense - please let me know if you have anymore questions. I will supply the project, which is setup and working except for the above functionality which need adding. I can also advise on the kirby side of things but in terms of this project it will be as if you're working with any php page.

Beceriler: PHP

Daha fazlasını görün: jquery find element by class, mapbox js, mapbox api, mapbox gl api, mapbox gl query rendered features, mapbox setfilter, jquery find element by id, get image id onclick javascript, interactive map using jquery, jquery interactive map search, interactive map jquery css, jquery interactive map australia, interactive map html5 jquery, jquery html5 interactive map, jquery interactive map zoom

İşveren Hakkında:
( 11 değerlendirme ) Swansea, United Kingdom

Proje NO: #14877080

10 freelancer bu iş için ortalamada 67£ teklif veriyor

in 3 gün içinde350£ GBP
(98 Değerlendirme)
8.5
amangpt145

Hello,I can complete your project on time and within your budget.I read through the job details extremely carefully and I am absolutely sure that I can do the project. Relevant Skills and Experience I will give you Daha fazlası

1 gün içinde 18£ GBP
(41 Değerlendirme)
5.9
TuckerAlexander

Hello! I could certainly implement the information display functionality you require. Please view my portfolio for similar projects. Relevant Skills and Experience I'm proficient in html5, css3, js/jquery and php. Pr Daha fazlası

1 gün içinde 23£ GBP
(45 Değerlendirme)
5.9
artifexonline

Hi, I have reviewed your requirement and I can do this job as per your requirement. I have a advanced skills in WORDPRESS , Laravel, Angular JS ,PHP, Codeigniter,MYSQL, Joomla,JavaScript, API Integration,Plugins , Daha fazlası

1 gün içinde 83£ GBP
(26 Değerlendirme)
5.6
mohsinhassan63

Hey sir, i want to discuss about job please hit me up in the chat, before you are awarded. I'm ready to start immediately, Please contact me. Regards Mohsin Stay tuned, I'm still working on this proposal.

in 0 gün içinde20£ GBP
(57 Değerlendirme)
5.5
satyajeetkeshari

If looking for a good experienced web developer, then your are on right place. Development is my skill & passion. Relevant Skills and Experience PHP Proposed Milestones £13 GBP - Milestone1

1 gün içinde 13£ GBP
(27 Değerlendirme)
4.0
appleearth039

Hello, Client! Thanks for the opportunity to bid on your project. I'm a master in GIS fields. I have an experiance in web developing. html5, css3, javascript, jquery, php, wordpress, joomla. I've been developed web Daha fazlası

1 gün içinde 111£ GBP
(2 Değerlendirme)
3.3
1 gün içinde 19£ GBP
(12 Değerlendirme)
2.6
1 gün içinde 18£ GBP
(0 Değerlendirme)
0.0
1 gün içinde 18£ GBP
(0 Değerlendirme)
0.0