Fix zoom feature on tracking map

Ditutup Disiarkan 2 bulan lepas Dibayar semasa penghantaran
Ditutup Dibayar semasa penghantaran

We have a map showing athletes on a course, and our previous developer included a feature whereby the map zooms to the participants. However, it is not working anymore and the current developers haven't had capacity to look at it as they are busy with other parts of the app. We need to find the bug and fix it.

The full code is in github, but below is the relevant section.

Note: If you do not have experience with maps, please do not respond to this.


If the athletes move and the user has not yet interacted with the map, pan the map so all athletes still show.

If the athletes move and the user has interacted with the map within the last 5 minutes, do nothing.

It the athletes move, and the user has not interacted in the last 5 minutes then pan to show all athletes in the race.

It the athletes move, and the user has not interacted in the last 5 minutes, and the user has selected favourites - then pan to show the selected favourites.


fitPositionsBounds() {

const {







} = [login to view URL];

const map = [login to view URL];

const bounds = [login to view URL]();

const isFinished = [login to view URL](athletes).filter(

(id) => athletes[id].isFinished


? true

: false;

const padding = [login to view URL] < 500 ? [50, 50] : [100, 100]; // Don't zoom too tight

const maxZoom = 14;

const options = { padding, maxZoom };

if ([login to view URL]() && simulateMassStart !== [login to view URL]) {

[login to view URL] = simulateMassStart;

[login to view URL](bounds, options);


if (

status !== "after" &&

!isFinished &&

![login to view URL] &&

!isMoving &&

checkpoints &&

[login to view URL]

) {

const startBounds = [login to view URL]();

[login to view URL](checkpoints[0]);

[login to view URL](checkpoints[1]);

// flyToBounds only works if map has an initial view

if ([login to view URL]() === undefined) {

[login to view URL](startBounds, options);

} else {

[login to view URL](startBounds, {

duration: 4,






// First bounds set - TODO: Don't set if map is zoomed to start

if (status !== "after" && [login to view URL]() && isMoving) {

if (![login to view URL]) {

[login to view URL](() => {

if ([login to view URL]().isValid()) {

[login to view URL](bounds, options);

} else {

[login to view URL](bounds, options);



// Store bounds so we now that the map is zoomed once

[login to view URL] = bounds;

} else {

if (![login to view URL]) {

// User has not been interacting with map

[login to view URL](bounds, options);

} else {

// User has been interacting with the map

const secondsSinceLastInteraction =

([login to view URL]() - [login to view URL]) / 1000;

// Fly to bounds if user is inactive

if (secondsSinceLastInteraction > MAP_INACTIVITY_TIME) {

const selectedAthletes = [login to view URL](athletes).filter(

(id) => positions[id] && athletes[id].isSelected


if ([login to view URL]) {

const mapBounds = [login to view URL]();

const selectedAthletesBounds = [login to view URL](

(latLngBounds, id) => [login to view URL](positions[id]),

[login to view URL]()


const zoom = [login to view URL]();

if (![login to view URL](selectedAthletesBounds)) {

const onFlyEnd = () => {

[login to view URL]("moveend", onFlyEnd);

// Second try: Zoom to athlete bounds if needed

if (![login to view URL](selectedAthletesBounds)) {

[login to view URL](selectedAthletesBounds, options);



if (zoom < 12) {

// First try: Fly to center of selected athletes, keep zoom

[login to view URL]("moveend", onFlyEnd);

[login to view URL]([login to view URL]());

} else {

[login to view URL](selectedAthletesBounds, options);



} else {

[login to view URL](bounds, options); // Fit to all athletes







Kartografi & Peta MySQL GPS

ID Projek: #37237845

Tentang projek

34 cadangan Projek jarak jauh Aktif 3 minggu lepas

34 pekerja bebas membida secara purata $480 untuk pekerjaan ini


Hello, I AM HERE TO FIX zoom feature on tracking map - Stay up-to-date with recent and relevant technologies ^^^^I am here to achieve your goals^^^^ I am Passionate PHP /Full stack developer having rich experience wit Lagi

$500 USD dalam 7 hari
(42 Ulasan)

Hello, Greetings! I have read your project description and am confident that I can complete this project to your satisfaction. However, I do have a few queries. Please leave a message in the chat so that we can discu Lagi

$600 USD dalam 8 hari
(51 Ulasan)

Hello Good evening , I hope you are doing great. Just finished reading the brief details of your job . I see you have been looking for a freelancer who has experience with Cartography & Maps, MySQL and GPS. Upon the f Lagi

$750 USD dalam 14 hari
(14 Ulasan)

Hi There, I hope this message finds you well. I understand that you are experiencing an issue with the map zoom feature in your app. I have reviewed the relevant section of the code you provided, and I believe I can h Lagi

$500 USD dalam 15 hari
(18 Ulasan)

Please provide specific error message or behavior when using map zoom feature. I will fix the bug within estimated timeline and propose hourly rate for compensation. Thank you for considering my services, and I am conf Lagi

$675 USD dalam 5 hari
(19 Ulasan)

Hi Good evening This is Umair You can see clearly from my profile that all my reviews/feedbacks are 5 stars and that's for a sole reason that I only take those projects which are doable for me. I am very much famil Lagi

$700 USD dalam 15 hari
(2 Ulasan)

Hey there, I have 4 years of working experience in web technologies and I have a strong working knowledge of every possible framework which is in the market. In terms of client-end I know: MySQL, GPS and Cartography & Lagi

$750 USD dalam 19 hari
(1 Ulasan)

Hi hope you doing Good. I read your job brief regarding fixing zoom issue in your web app right Yes I can fix your Project all issues that will leave a wonderful impact on your user and its very Very economical for y Lagi

$250 USD dalam 2 hari
(2 Ulasan)

Hello, I'm an experienced Mern Stackdeveloper. I can help fix zoom feature on tracking map. I can start your project immediately. Best regards

$500 USD dalam 5 hari
(1 Ulasan)

hello. I checked your js code carefully and very interested. I'v rich expriences of google map and web developments. I am confident to satisfy you and hope to work for you. best regards

$670 USD dalam 8 hari
(3 Ulasan)

Dear Client, I hope this message finds you well. I'm thrilled to submit my bid for the project you have posted. As an experienced software engineer with a strong focus on MySQL development, I am confident in my abilit Lagi

$500 USD dalam 7 hari
(3 Ulasan)

hi i have read your description i will fix your zoom feature on tracking map please give me a chance i am expert of js jquery and have a strong efficiency of developer. Thanx

$300 USD dalam sehari
(5 Ulasan)

Hello, Thanks for your job posting. I believe I can help you with 100% satisfied results. I am ready to start immediately and can complete with high-quality, fast speed as you want. Please start the chat and lets disc Lagi

$700 USD dalam 7 hari
(1 Ulasan)

Dear Client, I hope this proposal finds you in good spirits! I couldn't help but notice the zoom feature on your tracking map seems to be giving you a bit of trouble. Fear not, for I am here to save the day! With my Lagi

$290 USD dalam 7 hari
(0 Ulasan)

Daniel G.! Nice to meet you I am extremely interested your project Fix zoom feature on tracking map and It seems great! I am an expert who has many years of experience on Cartography & Maps, MySQL, GPS so I am sure t Lagi

$320 USD dalam 7 hari
(0 Ulasan)

Hi Mate Daniel G., Good evening! I am an expert mobile developer with skills including MySQL, GPS and Cartography & Maps. "moveend" Please contact me to discuss more about this project. Looking forward to serve yo Lagi

$750 USD dalam 6 hari
(0 Ulasan)

Hi, how are you? I read your project details and really interested in this project. I am full stack developer having a 5+ year experience doing similar jobs regarding to these skills Cartography & Maps, GPS and MySQL. Lagi

$350 USD dalam 8 hari
(0 Ulasan)

Hi there, I am thrilled to express my interest in your Fix zoom feature on tracking map project. Leveraging a rich background spanning 4-5 years in GPS, Cartography & Maps and MySQL, I am well-equipped to bring substa Lagi

$700 USD dalam 15 hari
(1 Ulasan)

Hi, dear! I have good experience in google map. I'm sure I can help you absolutely. Please contact me. Regards!

$400 USD dalam 2 hari
(0 Ulasan)

Hi Sir, As a highly skilled and experienced, I am confident that I can provide the high-quality work you need, but i have some doubts regarding the same, lets discuss in detail make it clear & then i am ready to start Lagi

$500 USD dalam 7 hari
(0 Ulasan)