Skip to content

Releases: ales-pokora/wp-places-map

v1.0.23 — prázdný štítek typu v detailu místa

Choose a tag to compare

@ales-pokora ales-pokora released this 26 Aug 10:06

Oprava: místo bez typu vykreslilo prázdnou zelenou "pilulku" nad názvem. Atribut hidden teď uvnitř .wppm-wrap a .wppm-modal přebije vlastní display pravidla.

v1.0.22 — mapa umí číst z cizího post typu

Choose a tag to compare

@ales-pokora ales-pokora released this 26 Aug 09:49

Pět nových filtrů umožní napojit mapu na existující CPT webu místo vlastního wppm_place, takže data nemusí žít na dvou místech: wppm_facilities_query_args, wppm_facility, wppm_facilities, wppm_cache_post_types, wppm_filter_terms.

wppm_facility běží před kontrolou GPS, aby si cizí zdroj mohl dodat souřadnice z vlastních meta klíčů.

Pro weby, které žádný filtr nepoužívají, se nic nemění.

v1.0.21 — vzhled mapy se řídí nastavením barvy

Choose a tag to compare

@ales-pokora ales-pokora released this 26 Aug 09:27

Celá UI (filtrační piluky, tlačítka, karty, detailní modál) se nyní barví podle nastavení Barva markeru, ne jen markery a clustery. Z jednoho hexu se odvodí celá rampa a vloží jako inline styl.

Weby na výchozí barvě #41C8F4 se nemění — v tom případě se nevkládá nic.

Opraveno také WPPM_VERSION, které viselo na 1.0.18 a nechávalo prohlížeče servírovat CSS/JS z cache.

v1.0.20 — CTA "Navštívit web" jako hlavní tlačítko

Choose a tag to compare

@ales-pokora ales-pokora released this 24 Jul 11:28

Hlavní CTA v detailu zařízení nyní odkazuje na web zařízení ("Navštívit web"), zobrazí se jen když je web vyplněn. "Navigovat" se přesunulo do sekundární řady vedle telefonu a e-mailu. Opravuje 1.0.19.

v1.0.19 — CTA "Navštívit web" v detailu zařízení

Choose a tag to compare

@ales-pokora ales-pokora released this 24 Jul 11:21

Tlačítko akce webu v modálním detailu místa přejmenováno z "Web" na "Navštívit web". Info řádek (ikona glóbu) zůstává "Web" + doména.

Nový i18n klíč webCta; frontend.js ho čte pro sekundární akci webu. Sdílený klíč web beze změny.

v1.0.18 — Revert zoom, nudge Praha indicator off-centre

Choose a tag to compare

@ales-pokora ales-pokora released this 25 May 11:33

1.0.17 was too aggressive — bumping default zoom to 8 fixed Praha clickability but threw away the CZ-wide overview.

Better fix: keep zoom 7 and move only Praha's count indicator (cluster bubble or region count badge) from the geometric centre to the NE quadrant of the polygon (lat 50.13, lng 14.60 — verified inside the polygon). The Praha polygon now shows clearly around the indicator and the user can click either the polygon edge or the badge — both activate Praha.

  • New label_lng / label_lat properties on the Praha feature in cz-kraje.geojson; data-driven so other small regions can opt in later without code changes.
  • parseRegionPolygons threads the label position through to region records; regionCentroid prefers it over the area-weighted centroid.
  • Cluster renderer accepts a regions getter and re-anchors cluster icons that land inside a region with a label position. Halo overlays (the pulsing glow) re-anchor too so the pulse follows the icon, not empty space.
  • Counter-migration: installs that ran 1.0.17's auto-bump 7→8 get reverted back to 7. Only fires when wppm_db_version == '1.0.17' AND stored zoom is still 8, so explicit user choices made on 1.0.17 are preserved.

v1.0.17 — Default zoom 7 → 8 + one-shot migration

Choose a tag to compare

@ales-pokora ales-pokora released this 25 May 11:22

Praha is the smallest kraj; at default zoom 7 the polygon renders ~30 px wide — smaller than a single 34×44 px facility pin. With exactly one Praha facility the pin sits dead-centre over the whole polygon, there's no cluster bubble for the 1.0.16 cluster-click trick to intercept, and no visible polygon margin to click as a region.

At zoom 8 Praha is ~60 px wide — the polygon shows clearly around the pin and the region is clickable again.

  • Default default_zoom bumped from 7 → 8 across all touch-points (defaults(), sanitize fallback, render fallback, shortcode atts fallback, activate() seed, admin snippet).
  • One-shot migration: existing installs with default_zoom = 7 get bumped to 8 on the first 1.0.17 load. Installs that explicitly chose another zoom (5, 9, …) are left alone.
  • Migration framework added via the new wppm_db_version option so future one-shot data fixes have a safe place to run — activate() doesn't fire on plugin update, which has been a structural gap.

v1.0.16 — Cluster click drills into kraj

Choose a tag to compare

@ales-pokora ales-pokora released this 25 May 11:08

Fixes the "I can't click on Praha because the cluster bubble covers it" problem.

At default CZ-wide zoom 7, the 56 px cluster bubble is wider than the Praha polygon, so the bubble visually sits on top of the kraj and eats clicks intended for the polygon. MarkerClusterer's default onClusterClick was a zoom-to-fit on the two contained markers — never what the user wanted.

  • Override onClusterClick: if the cluster centre lies inside a region polygon, call activateRegion(slug) — the same path the polygon's own click handler uses (filter applied + kraj highlighted + fitBounds on the kraj).
  • Clicking the "2" bubble over Praha is now equivalent to clicking the Praha polygon: the map drills into Praha, the chip "Kraj: Hlavní město Praha" appears, the two markers spread out.
  • Fallback to MarkerClusterer's default fitBounds for clusters that don't sit inside any known polygon (shouldn't happen on CZ data, kept for safety).

v1.0.15 — Praha click + badge centroid fix

Choose a tag to compare

@ales-pokora ales-pokora released this 25 May 11:00

Follow-up to 1.0.14 — clicking Praha now actually selects Praha (not Středočeský), and the per-region count badges separate visually.

  • Středočeský polygon is now a proper donut with a Praha-shaped hole (mapshaper -erase). Without the hole, Středočeský was a solid blob geographically covering Praha, so map.data dispatched clicks inside Praha to Středočeský.
  • Region count badges use an area-weighted shoelace centroid (holes contribute negative signed area). Středočeský's badge moves ~10 km east of Praha; before this both badges resolved to the same point via bounds.getCenter().
  • parseRegionPolygons now passes outer + hole rings to google.maps.Polygon, so containsLocation respects holes — Praha-located facilities can't classify as Středočeský even on a different iteration order.

v1.0.14 — Restore Praha as separate selectable region

Choose a tag to compare

@ales-pokora ales-pokora released this 25 May 10:49

Praha (CZ010) is back as its own selectable kraj on the map — own polygon, hover tooltip, count badge, region chip. Reverts the 1.0.8 mapshaper dissolve that folded Praha into Středočeský (CZ020).

  • Bundled cz-kraje.geojson back to 14 features
  • Praha-located facilities now classify as "Hlavní město Praha", not Středočeský
  • Středočeský kraj remains the surrounding ring polygon — contains only middle-Bohemian facilities
  • No frontend logic changes — region handling has always been data-driven from the geojson