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

Add Tooltip and Popups for markers/lines #31

Merged
merged 2 commits into from
Aug 4, 2021

Conversation

savage13
Copy link
Contributor

@savage13 savage13 commented Jul 26, 2021

Adds Popups to edit descriptions of Markers and Polylines as referenced in #19
Add Tooltips taken from the title value.

This add an AppMapPopup.vue with associated Typescript file. This vue emits messages title and text when the values are changed to keep the GeoJSON in sync.

If the Marker structure includes feature.properties it will save these values to the exported file, see https://stackoverflow.com/a/35819611

I am open to improvements to the popup's style or keeping the GeoJSON properties in sync.


This change is Reviewable

Can Import/Export from GeoJSON
Tooltip is set from the title
@leoetlino leoetlino self-requested a review July 28, 2021 11:54
@leoetlino
Copy link
Member

Have you tested whether existing GeoJSON data can still get re-imported correctly?

addGeoJSONFeatureToLayer() builds the expected object structure
@savage13
Copy link
Contributor Author

savage13 commented Aug 4, 2021

  • The two functions (addGeoJSONFeatureToLayer and addPopupAndTooltip) were moved up in the file and are now free.
  • Fixed space and single quote formatting issues.
  • I grabbed a JSON file from the current objmap and was able to successfully load it when using the updated code. 😃 The JSON file contained a line and a couple of markers (I think that covers the available features).

@leoetlino leoetlino merged commit e9ef0d5 into zeldamods:master Aug 4, 2021
@savage13 savage13 deleted the popups branch September 2, 2021 21:11
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.

2 participants