Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor javascript, make geoJson include a pid #62

Open
wants to merge 5 commits into
base: 7.x
Choose a base branch
from

Conversation

whikloj
Copy link
Collaborator

@whikloj whikloj commented Aug 29, 2019

Resolves: #60

The geoJson implementation did not include a pid to allow us to open the popup window. I have refactored the code to include it as a property of the feature.

I have NOT tested this will a hook implementation bringing in outside geoJson. That could break the callback. Best case scenario, you get a map but clicking the markers doesn't open a popup. Worst case scenario, you don't get a map at all

I also refactored the Javascript into a core abstract class IslandoraSimpleMap and then extended that class for Google (IslandoraGoogleSimpleMap) and OpenStreet Maps (IslandoraOSMSimpleMap).

This means each implementation only needs to overwrite the functions to do things in their way. The core initialization and decision making tree is common to both.

It does mean a lot more little functions, but a lot less duplicated javascript.

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.

GeoJson breaks collection map markers
1 participant