Skip to content

Event-based geocoding for DT location fields#204

Open
jlamanskygitt wants to merge 5 commits into
DiscipleTools:masterfrom
jlamanskygitt:master
Open

Event-based geocoding for DT location fields#204
jlamanskygitt wants to merge 5 commits into
DiscipleTools:masterfrom
jlamanskygitt:master

Conversation

@jlamanskygitt

Copy link
Copy Markdown
Contributor

Switched to event-based geocoding for DT location map. Resolves #203

@netlify

netlify Bot commented Jun 8, 2026

Copy link
Copy Markdown

Deploy Preview for jade-chebakia-17493f ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 34af99d
🔍 Latest deploy log https://app.netlify.com/projects/jade-chebakia-17493f/deploys/6a2c22636ae9cb000873d023
😎 Deploy Preview https://deploy-preview-204--jade-chebakia-17493f.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jlamanskygitt jlamanskygitt reopened this Jun 11, 2026
Comment thread src/services/componentService.js Outdated
Comment on lines +107 to +121
if (!el.dataset.eventDtGeocode) {
el.addEventListener(
'dt:geocode',
this.handleGeocodeEvent.bind(this)
);
el.dataset.eventDtGeocode = true;
}

if (el.googleToken && !this.googleGeocodeService) {
this.googleGeocodeService = new GoogleGeocodeService(
el.googleToken,
window,
document,
);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will cause all of the other components with load events to also have geocode event handlers. That's not what we want. Tags, connections, etc., don't need to handle geocode events.

Instead of having this in the attachLoadEvents function, we should create a new function just to attachGeocodeEvents. Similar to the file upload function, this geocoding is separate from the load events but the function can be called in the initialize function.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, that makes sense! I created attachGeocodeEvents() and moved the logic there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Event-based geocoding for DT location fields

2 participants