jeffreykemp / jk64-plugin-reportmap

Report Google Map APEX Plugin
https://jeffreykemp.github.io/jk64-plugin-reportmap/
MIT License
42 stars 16 forks source link

reload data and markers #87

Closed xCite1986 closed 4 years ago

xCite1986 commented 4 years ago

hey jeffrey. Since version 1.1, has the function of reloading the markers and the data set without refreshing the entire map? I'm not very good with javascript. is there an example of how to initiate this?

refreshing the map with <script type="text/javascript"> setInterval("jQuery('#map').trigger('apexrefresh');", 5000.); </script> works now well with disabling autoFitBounds but i dont like blinking markers :)

oh... another short question: is it possible to follow a specific marker after refresh? would be great for realtimemap with tracking a course

jeffreykemp commented 4 years ago

When you refresh the map, it is expected that there may be a short time delay between the removal of the existing markers and showing them again, so there may be a visible "blinking" effect. I don't know how this could be remedied.

If you want to centre the map on a specific marker, you can call map.panTo (refer https://github.com/jeffreykemp/jk64-plugin-reportmap/wiki/Plugin-API-Reference for examples).

xCite1986 commented 4 years ago

okay, thanks. i found a solution for focusing a specific marker - not the best webpage performance but it works ;-)

<script type="text/javascript"> setInterval("jQuery('#mymap').trigger('apexrefresh');", 5000); setInterval("jQuery('#map_mymap').reportmap('click','1');", 1000); </script>