Add polygon, polyline, and rectangle support#67
Open
jimsafley wants to merge 9 commits intofeature/multi-locationfrom
Open
Add polygon, polyline, and rectangle support#67jimsafley wants to merge 9 commits intofeature/multi-locationfrom
jimsafley wants to merge 9 commits intofeature/multi-locationfrom
Conversation
Stores all location types as GeoJSON in a new geometry_json column, with latitude and longitude computed from it for backward-compatible address search. Enables the Leaflet.draw shape tools on the edit form, adds Leaflet.deflate to collapse small shapes at low zoom, and updates the browse map, item show page, exhibit layout, and static site export to render shapes alongside point markers.
'Balloon' is legacy terminology; 'popup' is the standard term used throughout the mapping library. Also switches CSS class names from underscores to hyphens to match standard convention.
Add a gray full-bleed header (label or item title) to browse, item show, and exhibit popups. Browse popup order: header → thumbnail → title link → snippet. Exhibit popup: header → attachment body → title link. Scope CSS with :has() to avoid affecting edit-form popups. Remove theme-inherited dotted border-bottom from popup links.
Store the bounding box center as latitude/longitude on shape _locationData so that _mapForm has coordinates to seed the initial map view when re-rendering after a failed save. Previously, shapes had no lat/lng in _locationData, causing the map to center at 0°N 0°E.
Member
|
I changed the base so this will be easier to look at in the interface. |
Simplify the listener that calls popup.update() after images load, removing the dependency on Leaflet's private _panAnim API. Move it from addMarker into addLayerFromGeometry so shapes get the same treatment as markers.
Moves SR announcement logic from addMarker into addLayerFromGeometry so it covers both markers and shapes. Shapes now announce title, bounding box center coordinates, and open/close status, consistent with markers.
The previous check accepted values like {"type":"Point"} (no coordinates)
or {"type":"LineString","coordinates":[]} which would cause PHP warnings
in beforeSave() and could crash the edit form when loaded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extends location support beyond point markers to include polygons, polylines, and rectangles. Shapes can be drawn, edited, labeled, and deleted on the item edit map, and render natively on browse, item show, and exhibit maps. Existing point locations and the geographic radius search are unaffected.
This release also redesigns map popups to match Omeka S Mapping style, and replaces the term "balloon" with "popup" throughout.