@trismegisto/maps 3.3.14 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -5
- package/dist/basemaps/br/index.d.ts +10 -0
- package/dist/basemaps/br/index.js +4 -0
- package/dist/basemaps/br/index.js.map +1 -0
- package/{types/trismegisto-maps-basemaps-br.d.ts → dist/basemaps/br-mesorregioes/index.d.ts} +3 -7
- package/dist/basemaps/br-mesorregioes/index.js +4 -0
- package/dist/basemaps/br-mesorregioes/index.js.map +1 -0
- package/dist/basemaps/br-microrregioes/index.d.ts +10 -0
- package/dist/basemaps/br-microrregioes/index.js +4 -0
- package/dist/basemaps/br-microrregioes/index.js.map +1 -0
- package/dist/basemaps/br-municipios/ac/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/ac/index.js +4 -0
- package/dist/basemaps/br-municipios/ac/index.js.map +1 -0
- package/dist/basemaps/br-municipios/al/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/al/index.js +4 -0
- package/dist/basemaps/br-municipios/al/index.js.map +1 -0
- package/dist/basemaps/br-municipios/am/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/am/index.js +4 -0
- package/dist/basemaps/br-municipios/am/index.js.map +1 -0
- package/dist/basemaps/br-municipios/ap/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/ap/index.js +4 -0
- package/dist/basemaps/br-municipios/ap/index.js.map +1 -0
- package/dist/basemaps/br-municipios/ba/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/ba/index.js +4 -0
- package/dist/basemaps/br-municipios/ba/index.js.map +1 -0
- package/dist/basemaps/br-municipios/ce/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/ce/index.js +4 -0
- package/dist/basemaps/br-municipios/ce/index.js.map +1 -0
- package/dist/basemaps/br-municipios/df/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/df/index.js +4 -0
- package/dist/basemaps/br-municipios/df/index.js.map +1 -0
- package/dist/basemaps/br-municipios/es/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/es/index.js +4 -0
- package/dist/basemaps/br-municipios/es/index.js.map +1 -0
- package/dist/basemaps/br-municipios/go/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/go/index.js +4 -0
- package/dist/basemaps/br-municipios/go/index.js.map +1 -0
- package/dist/basemaps/br-municipios/ma/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/ma/index.js +4 -0
- package/dist/basemaps/br-municipios/ma/index.js.map +1 -0
- package/dist/basemaps/br-municipios/mg/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/mg/index.js +4 -0
- package/dist/basemaps/br-municipios/mg/index.js.map +1 -0
- package/dist/basemaps/br-municipios/ms/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/ms/index.js +4 -0
- package/dist/basemaps/br-municipios/ms/index.js.map +1 -0
- package/dist/basemaps/br-municipios/mt/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/mt/index.js +4 -0
- package/dist/basemaps/br-municipios/mt/index.js.map +1 -0
- package/dist/basemaps/br-municipios/pa/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/pa/index.js +4 -0
- package/dist/basemaps/br-municipios/pa/index.js.map +1 -0
- package/dist/basemaps/br-municipios/pb/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/pb/index.js +4 -0
- package/dist/basemaps/br-municipios/pb/index.js.map +1 -0
- package/dist/basemaps/br-municipios/pe/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/pe/index.js +4 -0
- package/dist/basemaps/br-municipios/pe/index.js.map +1 -0
- package/dist/basemaps/br-municipios/pi/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/pi/index.js +4 -0
- package/dist/basemaps/br-municipios/pi/index.js.map +1 -0
- package/dist/basemaps/br-municipios/pr/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/pr/index.js +4 -0
- package/dist/basemaps/br-municipios/pr/index.js.map +1 -0
- package/dist/basemaps/br-municipios/rj/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/rj/index.js +4 -0
- package/dist/basemaps/br-municipios/rj/index.js.map +1 -0
- package/dist/basemaps/br-municipios/rn/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/rn/index.js +4 -0
- package/dist/basemaps/br-municipios/rn/index.js.map +1 -0
- package/dist/basemaps/br-municipios/ro/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/ro/index.js +4 -0
- package/dist/basemaps/br-municipios/ro/index.js.map +1 -0
- package/dist/basemaps/br-municipios/rr/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/rr/index.js +4 -0
- package/dist/basemaps/br-municipios/rr/index.js.map +1 -0
- package/dist/basemaps/br-municipios/rs/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/rs/index.js +4 -0
- package/dist/basemaps/br-municipios/rs/index.js.map +1 -0
- package/dist/basemaps/br-municipios/sc/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/sc/index.js +4 -0
- package/dist/basemaps/br-municipios/sc/index.js.map +1 -0
- package/dist/basemaps/br-municipios/se/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/se/index.js +4 -0
- package/dist/basemaps/br-municipios/se/index.js.map +1 -0
- package/dist/basemaps/br-municipios/sp/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/sp/index.js +4 -0
- package/dist/basemaps/br-municipios/sp/index.js.map +1 -0
- package/dist/basemaps/br-municipios/to/index.d.ts +10 -0
- package/dist/basemaps/br-municipios/to/index.js +4 -0
- package/dist/basemaps/br-municipios/to/index.js.map +1 -0
- package/dist/basemaps/world/index.d.ts +10 -0
- package/dist/basemaps/world/index.js +4 -0
- package/dist/basemaps/world/index.js.map +1 -0
- package/dist/basemaps/world-50m/index.d.ts +10 -0
- package/dist/basemaps/world-50m/index.js +4 -0
- package/dist/basemaps/world-50m/index.js.map +1 -0
- package/dist/src/core/basemap-loaders.generated.d.ts +7 -0
- package/dist/src/core/basemap-loaders.generated.js +67 -0
- package/dist/src/core/basemap-loaders.generated.js.map +1 -0
- package/dist/src/core/basemap.d.ts +86 -0
- package/dist/src/core/basemap.js +286 -0
- package/dist/src/core/basemap.js.map +1 -0
- package/dist/src/core/choropleth-layer.d.ts +63 -0
- package/dist/src/core/choropleth-layer.js +112 -0
- package/dist/src/core/choropleth-layer.js.map +1 -0
- package/dist/src/core/choropleth.d.ts +61 -0
- package/dist/src/core/choropleth.js +121 -0
- package/dist/src/core/choropleth.js.map +1 -0
- package/dist/src/core/cluster-groups.d.ts +32 -0
- package/dist/src/core/cluster-groups.js +45 -0
- package/dist/src/core/cluster-groups.js.map +1 -0
- package/dist/src/core/cluster.d.ts +16 -0
- package/dist/src/core/cluster.js +58 -0
- package/dist/src/core/cluster.js.map +1 -0
- package/dist/src/core/engine.d.ts +95 -0
- package/dist/src/core/engine.js +223 -0
- package/dist/src/core/engine.js.map +1 -0
- package/dist/src/core/geo.d.ts +49 -0
- package/dist/src/core/geo.js +93 -0
- package/dist/src/core/geo.js.map +1 -0
- package/dist/src/core/geojson.d.ts +68 -0
- package/dist/src/core/geojson.js +80 -0
- package/dist/src/core/geojson.js.map +1 -0
- package/dist/src/core/index.d.ts +26 -0
- package/dist/src/core/index.js +34 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/interactions.d.ts +76 -0
- package/dist/src/core/interactions.js +338 -0
- package/dist/src/core/interactions.js.map +1 -0
- package/dist/src/core/localities.d.ts +36 -0
- package/dist/src/core/localities.js +63 -0
- package/dist/src/core/localities.js.map +1 -0
- package/dist/src/core/map-layers.d.ts +152 -0
- package/dist/src/core/map-layers.js +141 -0
- package/dist/src/core/map-layers.js.map +1 -0
- package/dist/src/core/maps-i18n.d.ts +19 -0
- package/dist/src/core/maps-i18n.js +25 -0
- package/dist/src/core/maps-i18n.js.map +1 -0
- package/dist/src/core/maps-messages.d.ts +125 -0
- package/dist/src/core/maps-messages.en.d.ts +2 -0
- package/dist/src/core/maps-messages.en.js +83 -0
- package/dist/src/core/maps-messages.en.js.map +1 -0
- package/dist/src/core/maps-messages.es.d.ts +2 -0
- package/dist/src/core/maps-messages.es.js +83 -0
- package/dist/src/core/maps-messages.es.js.map +1 -0
- package/dist/src/core/maps-messages.js +83 -0
- package/dist/src/core/maps-messages.js.map +1 -0
- package/dist/src/core/projection.d.ts +42 -0
- package/dist/src/core/projection.js +59 -0
- package/dist/src/core/projection.js.map +1 -0
- package/dist/src/core/regions-layer.d.ts +27 -0
- package/dist/src/core/regions-layer.js +43 -0
- package/dist/src/core/regions-layer.js.map +1 -0
- package/dist/src/core/route-view.d.ts +54 -0
- package/dist/src/core/route-view.js +107 -0
- package/dist/src/core/route-view.js.map +1 -0
- package/dist/src/core/route.d.ts +80 -0
- package/dist/src/core/route.js +164 -0
- package/dist/src/core/route.js.map +1 -0
- package/dist/src/core/scale.d.ts +15 -0
- package/dist/src/core/scale.js +45 -0
- package/dist/src/core/scale.js.map +1 -0
- package/dist/src/core/shapes.d.ts +34 -0
- package/dist/src/core/shapes.js +74 -0
- package/dist/src/core/shapes.js.map +1 -0
- package/dist/src/core/street-view.d.ts +19 -0
- package/dist/src/core/street-view.js +30 -0
- package/dist/src/core/street-view.js.map +1 -0
- package/dist/src/core/tiles.d.ts +74 -0
- package/dist/src/core/tiles.js +216 -0
- package/dist/src/core/tiles.js.map +1 -0
- package/dist/src/core/topology.d.ts +61 -0
- package/dist/src/core/topology.js +145 -0
- package/dist/src/core/topology.js.map +1 -0
- package/dist/src/core/vector.d.ts +21 -0
- package/dist/src/core/vector.js +57 -0
- package/dist/src/core/vector.js.map +1 -0
- package/dist/src/core/view.d.ts +44 -0
- package/dist/src/core/view.js +90 -0
- package/dist/src/core/view.js.map +1 -0
- package/package.json +34 -149
- package/fesm2022/trismegisto-maps-basemaps-br-mesorregioes.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-mesorregioes.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-microrregioes.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-microrregioes.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ac.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ac.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-al.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-al.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-am.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-am.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ap.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ap.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ba.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ba.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ce.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ce.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-df.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-df.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-es.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-es.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-go.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-go.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ma.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ma.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-mg.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-mg.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ms.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ms.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-mt.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-mt.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pa.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pa.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pb.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pb.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pe.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pe.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pi.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pi.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pr.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-pr.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rj.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rj.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rn.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rn.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ro.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-ro.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rr.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rr.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rs.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-rs.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-sc.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-sc.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-se.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-se.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-sp.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-sp.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-to.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br-municipios-to.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-br.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-br.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-world-50m.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-world-50m.mjs.map +0 -1
- package/fesm2022/trismegisto-maps-basemaps-world.mjs +0 -10
- package/fesm2022/trismegisto-maps-basemaps-world.mjs.map +0 -1
- package/fesm2022/trismegisto-maps.mjs +0 -4901
- package/fesm2022/trismegisto-maps.mjs.map +0 -1
- package/types/trismegisto-maps-basemaps-br-mesorregioes.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-mesorregioes.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-microrregioes.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-microrregioes.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-ac.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-ac.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-al.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-al.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-am.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-am.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-ap.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-ap.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-ba.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-ba.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-ce.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-ce.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-df.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-df.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-es.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-es.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-go.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-go.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-ma.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-ma.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-mg.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-mg.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-ms.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-ms.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-mt.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-mt.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-pa.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-pa.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-pb.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-pb.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-pe.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-pe.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-pi.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-pi.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-pr.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-pr.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-rj.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-rj.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-rn.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-rn.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-ro.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-ro.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-rr.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-rr.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-rs.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-rs.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-sc.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-sc.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-se.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-se.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-sp.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-sp.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br-municipios-to.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-br-municipios-to.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-br.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-world-50m.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-world-50m.d.ts.map +0 -1
- package/types/trismegisto-maps-basemaps-world.d.ts +0 -14
- package/types/trismegisto-maps-basemaps-world.d.ts.map +0 -1
- package/types/trismegisto-maps.d.ts +0 -1785
- package/types/trismegisto-maps.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maps-messages.es.js","sourceRoot":"","sources":["../../../src/core/maps-messages.es.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB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e,EAAE,gBAAgB;QACjC,YAAY,EAAE,sFAAsF;QACpG,UAAU,EAAE,sBAAsB;QAClC,WAAW,EAAE,oBAAoB;QACjC,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,YAAY;QACtB,UAAU,EAAE,mBAAmB;QAC/B,QAAQ,EAAE,uBAAuB;QACjC,OAAO,EAAE,iDAAiD;QAC1D,KAAK,EAAE,GAAG;QACV,QAAQ,EAAE;YACR,CAAC,EAAE,OAAO;YACV,EAAE,EAAE,SAAS;YACb,CAAC,EAAE,MAAM;YACT,EAAE,EAAE,SAAS;YACb,CAAC,EAAE,KAAK;YACR,EAAE,EAAE,UAAU;YACd,CAAC,EAAE,OAAO;YACV,EAAE,EAAE,UAAU;SACf;QACD,OAAO,EAAE,+BAA+B;QACxC,SAAS,EAAE,+BAA+B;QAC1C,aAAa,EAAE,sCAAsC;QACrD,WAAW,EAAE,wBAAwB;KACtC;CACF,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
export const MAPS_MESSAGES_PT_BR = {
|
|
2
|
+
map: {
|
|
3
|
+
label: 'Mapa',
|
|
4
|
+
roleDescription: 'mapa',
|
|
5
|
+
instructions: 'Use as setas para mover o mapa e as teclas mais e menos para aproximar ou afastar. Com Shift, o movimento é maior.',
|
|
6
|
+
zoomStatus: 'Nível de zoom {zoom} de {max}',
|
|
7
|
+
attribution: 'Fontes dos dados do mapa',
|
|
8
|
+
},
|
|
9
|
+
controls: {
|
|
10
|
+
label: 'Controles do mapa',
|
|
11
|
+
zoomIn: 'Aproximar',
|
|
12
|
+
zoomOut: 'Afastar',
|
|
13
|
+
scale: 'Escala do mapa',
|
|
14
|
+
},
|
|
15
|
+
marker: {
|
|
16
|
+
label: 'Marcador',
|
|
17
|
+
},
|
|
18
|
+
popup: {
|
|
19
|
+
label: 'Detalhes do local',
|
|
20
|
+
close: 'Fechar',
|
|
21
|
+
},
|
|
22
|
+
cluster: {
|
|
23
|
+
zoom: 'Grupo de {count} marcadores. Acione para aproximar.',
|
|
24
|
+
expand: 'Grupo de {count} marcadores. Acione para mostrar todos.',
|
|
25
|
+
},
|
|
26
|
+
data: {
|
|
27
|
+
regions: 'Regiões: {label}',
|
|
28
|
+
regionsInstructions: 'Setas percorrem as regiões, Home e End vão à primeira e à última, Enter seleciona e Esc volta ao mapa.',
|
|
29
|
+
regionValue: '{name}: {value}',
|
|
30
|
+
regionNoData: '{name}: sem dados',
|
|
31
|
+
noData: 'Sem dados',
|
|
32
|
+
range: '{from} a {to}',
|
|
33
|
+
legend: 'Legenda: {label}',
|
|
34
|
+
showTable: 'Ver como tabela',
|
|
35
|
+
hideTable: 'Ver mapa',
|
|
36
|
+
tableCaption: 'Dados do mapa: {label}',
|
|
37
|
+
region: 'Região',
|
|
38
|
+
value: 'Valor',
|
|
39
|
+
loadError: 'Não foi possível carregar o mapa base.',
|
|
40
|
+
},
|
|
41
|
+
route: {
|
|
42
|
+
startAt: 'Partida: {label}',
|
|
43
|
+
start: 'Partida',
|
|
44
|
+
endAt: 'Chegada: {label}',
|
|
45
|
+
end: 'Chegada',
|
|
46
|
+
directions: 'Direções',
|
|
47
|
+
totals: '{distance} · {duration}',
|
|
48
|
+
alternatives: 'Rotas',
|
|
49
|
+
routeN: 'Rota {n}',
|
|
50
|
+
option: '{label}: {distance}, {duration}',
|
|
51
|
+
steps: 'Passos da rota',
|
|
52
|
+
stepsInstructions: 'Setas para cima e para baixo percorrem os passos; o mapa centra no passo em foco.',
|
|
53
|
+
empty: 'Esta rota não tem passos.',
|
|
54
|
+
},
|
|
55
|
+
streetView: {
|
|
56
|
+
label: 'Vista da rua',
|
|
57
|
+
roleDescription: 'vista da rua',
|
|
58
|
+
instructions: 'Setas para a esquerda e para a direita giram a vista; para cima e para baixo avançam e voltam.',
|
|
59
|
+
rotateLeft: 'Girar para a esquerda',
|
|
60
|
+
rotateRight: 'Girar para a direita',
|
|
61
|
+
forward: 'Avançar',
|
|
62
|
+
backward: 'Voltar',
|
|
63
|
+
fullscreen: 'Tela cheia',
|
|
64
|
+
controls: 'Controles da vista',
|
|
65
|
+
heading: 'Direção da vista: {degrees}° ({direction})',
|
|
66
|
+
north: 'N',
|
|
67
|
+
cardinal: {
|
|
68
|
+
n: 'norte',
|
|
69
|
+
ne: 'nordeste',
|
|
70
|
+
e: 'leste',
|
|
71
|
+
se: 'sudeste',
|
|
72
|
+
s: 'sul',
|
|
73
|
+
sw: 'sudoeste',
|
|
74
|
+
w: 'oeste',
|
|
75
|
+
nw: 'noroeste',
|
|
76
|
+
},
|
|
77
|
+
loading: 'Carregando a imagem do local…',
|
|
78
|
+
noImagery: 'Sem imagem para este local',
|
|
79
|
+
noImageryHint: 'Tente um ponto próximo, numa via.',
|
|
80
|
+
attribution: 'Fonte das imagens',
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=maps-messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"maps-messages.js","sourceRoot":"","sources":["../../../src/core/maps-messages.ts"],"names":[],"mappings":"AA6HA,MAAM,CAAC,MAAM,mBAAmB,GAAiB;IAC/C,GAAG,EAAE;QACH,KAAK,EAAE,MAAM;QACb,eAAe,EAAE,MAAM;QACvB,YAAY,EAAE,oHAAoH;QAClI,UAAU,EAAE,+BAA+B;QAC3C,WAAW,EAAE,0BAA0B;KACxC;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,mBAAmB;QAC1B,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,gBAAgB;KACxB;IACD,MAAM,EAAE;QACN,KAAK,EAAE,UAAU;KAClB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,mBAAmB;QAC1B,KAAK,EAAE,QAAQ;KAChB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,qDAAqD;QAC3D,MAAM,EAAE,yDAAyD;KAClE;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,kBAAkB;QAC3B,mBAAmB,EAAE,wGAAwG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ACjC;CACF,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Projeção EPSG:3857 ("Web Mercator", a dos tiles de quase todo provedor) e a grade de pixels/tiles.
|
|
3
|
+
*
|
|
4
|
+
* Três espaços:
|
|
5
|
+
* - **geográfico**: `{ lat, lng }` em graus;
|
|
6
|
+
* - **projetado**: metros em Mercator esférico (`project`/`unproject`);
|
|
7
|
+
* - **mundo em pixels** no zoom `z`: o planeta inteiro cabe num quadrado de `tileSize · 2^z` px, com
|
|
8
|
+
* (0, 0) no canto noroeste (lat ≈ 85,05°, lng −180°) e y crescendo para o sul.
|
|
9
|
+
*
|
|
10
|
+
* Um tile `{ x, y, z }` cobre o quadrado `[x·tileSize, (x+1)·tileSize) × [y·tileSize, (y+1)·tileSize)` do
|
|
11
|
+
* mundo em pixels no zoom `z`.
|
|
12
|
+
*/
|
|
13
|
+
import { LatLng, Point } from './geo';
|
|
14
|
+
/** Raio da esfera usada pelo EPSG:3857 (semieixo maior do WGS 84), em metros. */
|
|
15
|
+
export declare const EARTH_RADIUS = 6378137;
|
|
16
|
+
/** Latitude em que o mundo projetado vira um quadrado. Acima disso o Mercator não é desenhado. */
|
|
17
|
+
export declare const MAX_LATITUDE = 85.0511287798;
|
|
18
|
+
export declare const DEFAULT_TILE_SIZE = 256;
|
|
19
|
+
export interface TileCoords {
|
|
20
|
+
readonly x: number;
|
|
21
|
+
readonly y: number;
|
|
22
|
+
readonly z: number;
|
|
23
|
+
}
|
|
24
|
+
export declare function clampLatitude(lat: number): number;
|
|
25
|
+
/** Graus → metros em Mercator esférico. */
|
|
26
|
+
export declare function project(latlng: LatLng): Point;
|
|
27
|
+
/** Metros em Mercator esférico → graus. */
|
|
28
|
+
export declare function unproject(p: Point): LatLng;
|
|
29
|
+
/** Lado do mundo em pixels no zoom (fracionário é aceito). */
|
|
30
|
+
export declare function worldSize(zoom: number, tileSize?: number): number;
|
|
31
|
+
/** Inverso de `worldSize`: o zoom em que o mundo mede `size` px. */
|
|
32
|
+
export declare function zoomForWorldSize(size: number, tileSize?: number): number;
|
|
33
|
+
/** Graus → pixel no mundo do zoom. */
|
|
34
|
+
export declare function latLngToPixel(latlng: LatLng, zoom: number, tileSize?: number): Point;
|
|
35
|
+
/** Pixel no mundo do zoom → graus. */
|
|
36
|
+
export declare function pixelToLatLng(p: Point, zoom: number, tileSize?: number): LatLng;
|
|
37
|
+
/** Tile que contém a coordenada no zoom inteiro `z` (sem dar a volta no mundo: x pode sair de [0, 2^z)). */
|
|
38
|
+
export declare function latLngToTile(latlng: LatLng, z: number, tileSize?: number): TileCoords;
|
|
39
|
+
/** Canto noroeste do tile, em graus. `tileToLatLng({x: x+1, y: y+1, z})` dá o canto sudeste. */
|
|
40
|
+
export declare function tileToLatLng(tile: TileCoords, tileSize?: number): LatLng;
|
|
41
|
+
/** Metros que um pixel CSS representa na latitude dada, no zoom. */
|
|
42
|
+
export declare function metersPerPixel(lat: number, zoom: number, tileSize?: number): number;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/** Raio da esfera usada pelo EPSG:3857 (semieixo maior do WGS 84), em metros. */
|
|
2
|
+
export const EARTH_RADIUS = 6378137;
|
|
3
|
+
/** Latitude em que o mundo projetado vira um quadrado. Acima disso o Mercator não é desenhado. */
|
|
4
|
+
export const MAX_LATITUDE = 85.0511287798;
|
|
5
|
+
export const DEFAULT_TILE_SIZE = 256;
|
|
6
|
+
const DEG = Math.PI / 180;
|
|
7
|
+
/** Fator que leva metros projetados para a fração [0, 1] do mundo. */
|
|
8
|
+
const UNIT = 0.5 / (Math.PI * EARTH_RADIUS);
|
|
9
|
+
export function clampLatitude(lat) {
|
|
10
|
+
return Math.max(-MAX_LATITUDE, Math.min(MAX_LATITUDE, lat));
|
|
11
|
+
}
|
|
12
|
+
/** Graus → metros em Mercator esférico. */
|
|
13
|
+
export function project(latlng) {
|
|
14
|
+
const lat = clampLatitude(latlng.lat) * DEG;
|
|
15
|
+
return {
|
|
16
|
+
x: EARTH_RADIUS * latlng.lng * DEG,
|
|
17
|
+
y: EARTH_RADIUS * Math.log(Math.tan(Math.PI / 4 + lat / 2)),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/** Metros em Mercator esférico → graus. */
|
|
21
|
+
export function unproject(p) {
|
|
22
|
+
return {
|
|
23
|
+
lat: (2 * Math.atan(Math.exp(p.y / EARTH_RADIUS)) - Math.PI / 2) / DEG,
|
|
24
|
+
lng: p.x / EARTH_RADIUS / DEG,
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
/** Lado do mundo em pixels no zoom (fracionário é aceito). */
|
|
28
|
+
export function worldSize(zoom, tileSize = DEFAULT_TILE_SIZE) {
|
|
29
|
+
return tileSize * Math.pow(2, zoom);
|
|
30
|
+
}
|
|
31
|
+
/** Inverso de `worldSize`: o zoom em que o mundo mede `size` px. */
|
|
32
|
+
export function zoomForWorldSize(size, tileSize = DEFAULT_TILE_SIZE) {
|
|
33
|
+
return Math.log(size / tileSize) / Math.LN2;
|
|
34
|
+
}
|
|
35
|
+
/** Graus → pixel no mundo do zoom. */
|
|
36
|
+
export function latLngToPixel(latlng, zoom, tileSize = DEFAULT_TILE_SIZE) {
|
|
37
|
+
const m = project(latlng);
|
|
38
|
+
const size = worldSize(zoom, tileSize);
|
|
39
|
+
return { x: size * (UNIT * m.x + 0.5), y: size * (-UNIT * m.y + 0.5) };
|
|
40
|
+
}
|
|
41
|
+
/** Pixel no mundo do zoom → graus. */
|
|
42
|
+
export function pixelToLatLng(p, zoom, tileSize = DEFAULT_TILE_SIZE) {
|
|
43
|
+
const size = worldSize(zoom, tileSize);
|
|
44
|
+
return unproject({ x: (p.x / size - 0.5) / UNIT, y: (p.y / size - 0.5) / -UNIT });
|
|
45
|
+
}
|
|
46
|
+
/** Tile que contém a coordenada no zoom inteiro `z` (sem dar a volta no mundo: x pode sair de [0, 2^z)). */
|
|
47
|
+
export function latLngToTile(latlng, z, tileSize = DEFAULT_TILE_SIZE) {
|
|
48
|
+
const p = latLngToPixel(latlng, z, tileSize);
|
|
49
|
+
return { x: Math.floor(p.x / tileSize), y: Math.floor(p.y / tileSize), z };
|
|
50
|
+
}
|
|
51
|
+
/** Canto noroeste do tile, em graus. `tileToLatLng({x: x+1, y: y+1, z})` dá o canto sudeste. */
|
|
52
|
+
export function tileToLatLng(tile, tileSize = DEFAULT_TILE_SIZE) {
|
|
53
|
+
return pixelToLatLng({ x: tile.x * tileSize, y: tile.y * tileSize }, tile.z, tileSize);
|
|
54
|
+
}
|
|
55
|
+
/** Metros que um pixel CSS representa na latitude dada, no zoom. */
|
|
56
|
+
export function metersPerPixel(lat, zoom, tileSize = DEFAULT_TILE_SIZE) {
|
|
57
|
+
return (2 * Math.PI * EARTH_RADIUS * Math.cos(clampLatitude(lat) * DEG)) / worldSize(zoom, tileSize);
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=projection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projection.js","sourceRoot":"","sources":["../../../src/core/projection.ts"],"names":[],"mappings":"AAcA,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG,OAAO,CAAC;AACpC,kGAAkG;AAClG,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAErC,MAAM,GAAG,GAAG,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AAC1B,sEAAsE;AACtE,MAAM,IAAI,GAAG,GAAG,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,YAAY,CAAC,CAAC;AAQ5C,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC,CAAC;AAC9D,CAAC;AAED,2CAA2C;AAC3C,MAAM,UAAU,OAAO,CAAC,MAAc;IACpC,MA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ACpE,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,IAAY,EAAE,QAAQ,GAAG,iBAAiB;IACpF,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACvG,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camadas de regiões (`hm-map-basemap`, `hm-map-choropleth`) sem framework: regiões desenhadas, caminhos no
|
|
3
|
+
* enquadramento atual, rótulos e a área que a camada pede ao mapa.
|
|
4
|
+
*/
|
|
5
|
+
import { BasemapLayer, BasemapRegion, RegionLabel } from './basemap';
|
|
6
|
+
import { MapLayerExtent } from './map-layers';
|
|
7
|
+
import { LayerFrame } from './tiles';
|
|
8
|
+
/** Tamanho estimado do rótulo, em px, para evitar sobreposição (o desenho usa `--hm-font-size-xs`). */
|
|
9
|
+
export declare const REGION_LABEL_FONT_PX = 12;
|
|
10
|
+
/** Região pronta para o SVG: a geometria no enquadramento atual. */
|
|
11
|
+
export interface MapRegionPath {
|
|
12
|
+
readonly region: BasemapRegion;
|
|
13
|
+
readonly d: string;
|
|
14
|
+
}
|
|
15
|
+
/** Regiões da camada menos os códigos de `exclude` (sem diferença de caixa). */
|
|
16
|
+
export declare function excludeRegions(layer: BasemapLayer | null, exclude: readonly string[]): readonly BasemapRegion[];
|
|
17
|
+
/** Caminhos das regiões no enquadramento. */
|
|
18
|
+
export declare function regionPaths(regions: readonly BasemapRegion[], frame: LayerFrame, tileSize?: number): MapRegionPath[];
|
|
19
|
+
/**
|
|
20
|
+
* Texto do rótulo de cada região: `true`/`''` = o nome no idioma; uma string = essa propriedade (`'id'` cai
|
|
21
|
+
* no código da região); `false`/`null` = sem rótulos (`null`).
|
|
22
|
+
*/
|
|
23
|
+
export declare function regionLabelText(labels: boolean | string | null, locale: string): ((region: BasemapRegion) => string) | null;
|
|
24
|
+
/** Rótulos posicionados sem sobreposição. */
|
|
25
|
+
export declare function regionLabels(regions: readonly BasemapRegion[], labels: boolean | string | null, locale: string, frame: LayerFrame, tileSize?: number): RegionLabel[];
|
|
26
|
+
/** Área que a camada pede ao mapa (enquadramento e limites), ou `null` antes de carregar. */
|
|
27
|
+
export declare function regionsExtent(layer: BasemapLayer | null, fit: boolean): MapLayerExtent | null;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Camadas de regiões (`hm-map-basemap`, `hm-map-choropleth`) sem framework: regiões desenhadas, caminhos no
|
|
3
|
+
* enquadramento atual, rótulos e a área que a camada pede ao mapa.
|
|
4
|
+
*/
|
|
5
|
+
import { placeLabels, regionName, regionPath } from './basemap';
|
|
6
|
+
import { DEFAULT_TILE_SIZE } from './projection';
|
|
7
|
+
/** Tamanho estimado do rótulo, em px, para evitar sobreposição (o desenho usa `--hm-font-size-xs`). */
|
|
8
|
+
export const REGION_LABEL_FONT_PX = 12;
|
|
9
|
+
/** Regiões da camada menos os códigos de `exclude` (sem diferença de caixa). */
|
|
10
|
+
export function excludeRegions(layer, exclude) {
|
|
11
|
+
if (!layer)
|
|
12
|
+
return [];
|
|
13
|
+
if (!exclude.length)
|
|
14
|
+
return layer.regions;
|
|
15
|
+
const out = new Set(exclude.map((id) => String(id).toUpperCase()));
|
|
16
|
+
return layer.regions.filter((r) => !out.has(r.id.toUpperCase()));
|
|
17
|
+
}
|
|
18
|
+
/** Caminhos das regiões no enquadramento. */
|
|
19
|
+
export function regionPaths(regions, frame, tileSize = DEFAULT_TILE_SIZE) {
|
|
20
|
+
return regions.map((region) => ({ region, d: regionPath(region, frame, tileSize) }));
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Texto do rótulo de cada região: `true`/`''` = o nome no idioma; uma string = essa propriedade (`'id'` cai
|
|
24
|
+
* no código da região); `false`/`null` = sem rótulos (`null`).
|
|
25
|
+
*/
|
|
26
|
+
export function regionLabelText(labels, locale) {
|
|
27
|
+
if (labels === false || labels === null)
|
|
28
|
+
return null;
|
|
29
|
+
const key = labels === true || labels === '' ? null : labels;
|
|
30
|
+
return (r) => (key ? String(r.properties[key] ?? (key === 'id' ? r.id : '')) : regionName(r, locale));
|
|
31
|
+
}
|
|
32
|
+
/** Rótulos posicionados sem sobreposição. */
|
|
33
|
+
export function regionLabels(regions, labels, locale, frame, tileSize = DEFAULT_TILE_SIZE) {
|
|
34
|
+
const text = regionLabelText(labels, locale);
|
|
35
|
+
if (!regions.length || !text)
|
|
36
|
+
return [];
|
|
37
|
+
return placeLabels(regions, text, frame, REGION_LABEL_FONT_PX, tileSize);
|
|
38
|
+
}
|
|
39
|
+
/** Área que a camada pede ao mapa (enquadramento e limites), ou `null` antes de carregar. */
|
|
40
|
+
export function regionsExtent(layer, fit) {
|
|
41
|
+
return layer ? { bounds: layer.bounds, maxZoom: layer.maxZoom, fit } : null;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=regions-layer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"regions-layer.js","sourceRoot":"","sources":["../../../src/core/regions-layer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAA4C,WAAW,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE1G,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,uGAAuG;AACvG,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAQvC,gFAAgF;AAChF,MAAM,UAAU,cAAc,CAAC,KAA0B,EAAE,OAA0B;IACnF,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,CAAC;IACtB,IAAI,CAAC,OAAO,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC,OAAO,CAAC;IAC1C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAA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AE5B,MAAM,IAAI,GAAG,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACxC,OAAO,WAAW,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,oBAAoB,EAAE,QAAQ,CAAC,CAAC;AAC3E,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,aAAa,CAAC,KAA0B,EAAE,GAAY;IACpE,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { LatLng, Point } from './geo';
|
|
2
|
+
import { MapPathItem } from './map-layers';
|
|
3
|
+
import type { MapsMessages } from './maps-messages';
|
|
4
|
+
import { ManeuverIcon, MapRoute, RouteUnits } from './route';
|
|
5
|
+
import { LayerFrame } from './tiles';
|
|
6
|
+
/** Raio, em px, do ponto que marca o passo ativo na linha. */
|
|
7
|
+
export declare const ROUTE_ACTIVE_POINT_RADIUS = 6;
|
|
8
|
+
export interface RoutePathOptions {
|
|
9
|
+
readonly route: MapRoute;
|
|
10
|
+
readonly alternatives: readonly MapRoute[];
|
|
11
|
+
/** Passo destacado (`-1` = nenhum). */
|
|
12
|
+
readonly activeStep: number;
|
|
13
|
+
/** Clique numa alternativa (`id` da rota). */
|
|
14
|
+
readonly onSelect?: (id: string) => void;
|
|
15
|
+
/** Ponto da camada para uma coordenada (o do mapa). */
|
|
16
|
+
readonly layerPoint: (latlng: LatLng) => Point;
|
|
17
|
+
}
|
|
18
|
+
/** Caminhos da rota no SVG do mapa, de baixo para cima. */
|
|
19
|
+
export declare function routePathItems(keyPrefix: string, options: RoutePathOptions, frame: LayerFrame, tileSize?: number): MapPathItem[];
|
|
20
|
+
/** Ponto de partida (o 1º da rota) e de chegada (o último, se houver mais de um). */
|
|
21
|
+
export declare function routeEndpoints(route: MapRoute): {
|
|
22
|
+
start: LatLng | null;
|
|
23
|
+
end: LatLng | null;
|
|
24
|
+
};
|
|
25
|
+
/** Nomes acessíveis dos marcadores de partida e chegada. */
|
|
26
|
+
export declare function routeEndpointNames(text: MapsMessages['route'], startLabel: string, endLabel: string): {
|
|
27
|
+
start: string;
|
|
28
|
+
end: string;
|
|
29
|
+
};
|
|
30
|
+
/** Totais da rota ("12 km · 18 min"). */
|
|
31
|
+
export declare function routeTotalsText(route: MapRoute, text: MapsMessages['route'], locale: string, units: RouteUnits): string;
|
|
32
|
+
/** Uma linha da lista de rotas (escolhida + alternativas). */
|
|
33
|
+
export interface RouteOption {
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly label: string;
|
|
36
|
+
readonly distance: string;
|
|
37
|
+
readonly duration: string;
|
|
38
|
+
readonly name: string;
|
|
39
|
+
readonly selected: boolean;
|
|
40
|
+
}
|
|
41
|
+
/** Rotas como opções: a escolhida primeiro (selecionada), depois as alternativas. */
|
|
42
|
+
export declare function routeOptions(route: MapRoute, alternatives: readonly MapRoute[], text: MapsMessages['route'], locale: string, units: RouteUnits): RouteOption[];
|
|
43
|
+
/** Um passo da lista de direções pronto para a tela. */
|
|
44
|
+
export interface RouteStepView {
|
|
45
|
+
readonly instruction: string;
|
|
46
|
+
readonly icon: ManeuverIcon['icon'];
|
|
47
|
+
readonly solid: boolean;
|
|
48
|
+
readonly rotation: number;
|
|
49
|
+
readonly distance: string;
|
|
50
|
+
}
|
|
51
|
+
/** Passos com ícone da manobra (cheio para marcador e bandeira) e distância formatada. */
|
|
52
|
+
export declare function routeStepViews(route: MapRoute, locale: string, units: RouteUnits): RouteStepView[];
|
|
53
|
+
/** Passo de destino de uma tecla na lista (setas, Home, End); `null` = a tecla não é da lista. */
|
|
54
|
+
export declare function routeStepKeyTarget(key: string, active: number, total: number): number | null;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rota no mapa e lista de direções sem framework: caminhos da rota (alternativas, contorno, linha, trecho e
|
|
3
|
+
* ponto do passo ativo), nomes dos marcadores, totais, opções de rota, passos e o teclado da lista.
|
|
4
|
+
*/
|
|
5
|
+
import { formatMessage } from '@trismegisto/primitives/i18n';
|
|
6
|
+
import { toLatLng } from './geo';
|
|
7
|
+
import { resolvePathStyle } from './map-layers';
|
|
8
|
+
import { DEFAULT_TILE_SIZE } from './projection';
|
|
9
|
+
import { formatRouteDistance, formatRouteDuration, maneuverIcon, routeStepLocation, routeStepSegment, routeTotals, } from './route';
|
|
10
|
+
import { circlePathPx, linesPath } from './vector';
|
|
11
|
+
/** Raio, em px, do ponto que marca o passo ativo na linha. */
|
|
12
|
+
export const ROUTE_ACTIVE_POINT_RADIUS = 6;
|
|
13
|
+
/** Caminhos da rota no SVG do mapa, de baixo para cima. */
|
|
14
|
+
export function routePathItems(keyPrefix, options, frame, tileSize = DEFAULT_TILE_SIZE) {
|
|
15
|
+
const line = (key, points, className, onClick) => {
|
|
16
|
+
const d = linesPath([points], frame, false, tileSize);
|
|
17
|
+
return d ? { key, d, kind: 'line', ...resolvePathStyle({ className }, 'line'), onClick } : null;
|
|
18
|
+
};
|
|
19
|
+
const out = [];
|
|
20
|
+
const select = options.onSelect;
|
|
21
|
+
for (const alt of options.alternatives) {
|
|
22
|
+
out.push(line(`${keyPrefix}-alt-${alt.id}`, alt.points.map(toLatLng), 'hm-map-route__alt', select ? () => select(alt.id) : undefined));
|
|
23
|
+
}
|
|
24
|
+
const route = options.route;
|
|
25
|
+
const points = route.points.map(toLatLng);
|
|
26
|
+
out.push(line(`${keyPrefix}-casing`, points, 'hm-map-route__casing'));
|
|
27
|
+
out.push(line(`${keyPrefix}-line`, points, 'hm-map-route__line'));
|
|
28
|
+
const step = options.activeStep;
|
|
29
|
+
if (step >= 0) {
|
|
30
|
+
out.push(line(`${keyPrefix}-active`, routeStepSegment(route, step), 'hm-map-route__active'));
|
|
31
|
+
const location = routeStepLocation(route, step);
|
|
32
|
+
if (location) {
|
|
33
|
+
out.push({
|
|
34
|
+
key: `${keyPrefix}-active-point`,
|
|
35
|
+
d: circlePathPx(options.layerPoint(location), ROUTE_ACTIVE_POINT_RADIUS),
|
|
36
|
+
kind: 'point',
|
|
37
|
+
...resolvePathStyle({ className: 'hm-map-route__step-point' }, 'point'),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return out.filter((item) => !!item);
|
|
42
|
+
}
|
|
43
|
+
/** Ponto de partida (o 1º da rota) e de chegada (o último, se houver mais de um). */
|
|
44
|
+
export function routeEndpoints(route) {
|
|
45
|
+
const points = route.points;
|
|
46
|
+
return {
|
|
47
|
+
start: points.length ? toLatLng(points[0]) : null,
|
|
48
|
+
end: points.length > 1 ? toLatLng(points[points.length - 1]) : null,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** Nomes acessíveis dos marcadores de partida e chegada. */
|
|
52
|
+
export function routeEndpointNames(text, startLabel, endLabel) {
|
|
53
|
+
return {
|
|
54
|
+
start: startLabel ? formatMessage(text.startAt, { label: startLabel }) : text.start,
|
|
55
|
+
end: endLabel ? formatMessage(text.endAt, { label: endLabel }) : text.end,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/** Totais da rota ("12 km · 18 min"). */
|
|
59
|
+
export function routeTotalsText(route, text, locale, units) {
|
|
60
|
+
const totals = routeTotals(route);
|
|
61
|
+
return formatMessage(text.totals, {
|
|
62
|
+
distance: formatRouteDistance(totals.distance, locale, units),
|
|
63
|
+
duration: formatRouteDuration(totals.duration, locale),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/** Rotas como opções: a escolhida primeiro (selecionada), depois as alternativas. */
|
|
67
|
+
export function routeOptions(route, alternatives, text, locale, units) {
|
|
68
|
+
return [route, ...alternatives].map((r, index) => {
|
|
69
|
+
const totals = routeTotals(r);
|
|
70
|
+
const label = r.label || formatMessage(text.routeN, { n: index + 1 });
|
|
71
|
+
const distance = formatRouteDistance(totals.distance, locale, units);
|
|
72
|
+
const duration = formatRouteDuration(totals.duration, locale);
|
|
73
|
+
return { id: r.id, label, distance, duration, name: formatMessage(text.option, { label, distance, duration }), selected: index === 0 };
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
/** Passos com ícone da manobra (cheio para marcador e bandeira) e distância formatada. */
|
|
77
|
+
export function routeStepViews(route, locale, units) {
|
|
78
|
+
return route.steps.map((step) => {
|
|
79
|
+
const icon = maneuverIcon(step.maneuver);
|
|
80
|
+
return {
|
|
81
|
+
instruction: step.instruction,
|
|
82
|
+
icon: icon.icon,
|
|
83
|
+
solid: icon.icon === 'map-marker' || icon.icon === 'flag',
|
|
84
|
+
rotation: icon.rotation,
|
|
85
|
+
distance: step.distance > 0 ? formatRouteDistance(step.distance, locale, units) : '',
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/** Passo de destino de uma tecla na lista (setas, Home, End); `null` = a tecla não é da lista. */
|
|
90
|
+
export function routeStepKeyTarget(key, active, total) {
|
|
91
|
+
if (!total)
|
|
92
|
+
return null;
|
|
93
|
+
const current = Math.max(0, active);
|
|
94
|
+
switch (key) {
|
|
95
|
+
case 'ArrowDown':
|
|
96
|
+
return Math.min(total - 1, current + 1);
|
|
97
|
+
case 'ArrowUp':
|
|
98
|
+
return Math.max(0, current - 1);
|
|
99
|
+
case 'Home':
|
|
100
|
+
return 0;
|
|
101
|
+
case 'End':
|
|
102
|
+
return total - 1;
|
|
103
|
+
default:
|
|
104
|
+
return null;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=route-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-view.js","sourceRoot":"","sources":["../../../src/core/route-view.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,aAAa,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,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE;SACrF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,kBAAkB,CAAC,GAAW,EAAE,MAAc,EAAE,KAAa;IAC3E,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,WAAW;YACd,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;QAC1C,KAAK,SAAS;YACZ,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;QAClC,KAAK,MAAM;YACT,OAAO,CAAC,CAAC;QACX,KAAK,KAAK;YACR,OAAO,KAAK,GAAG,CAAC,CAAC;QACnB;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rotas e direções sem framework: o modelo de uma rota já calculada (pontos da linha + passos com
|
|
3
|
+
* manobra, distância e duração), totais, retângulo, trecho de cada passo e a formatação de distância e
|
|
4
|
+
* duração por idioma. Nada aqui calcula rota nem chama provedor: o app recebe a rota pronta do serviço que
|
|
5
|
+
* usar (OSRM, Google, Mapbox, HERE...) e a converte para este formato.
|
|
6
|
+
*/
|
|
7
|
+
import { LatLng, LatLngBounds, LatLngLike } from './geo';
|
|
8
|
+
/** Manobra de um passo (vocabulário comum aos serviços de rota). */
|
|
9
|
+
export type MapManeuver = 'depart' | 'arrive' | 'straight' | 'turn-left' | 'turn-right' | 'slight-left' | 'slight-right' | 'sharp-left' | 'sharp-right' | 'u-turn' | 'roundabout' | 'merge' | 'fork-left' | 'fork-right' | 'ramp' | 'ferry';
|
|
10
|
+
/** Um passo da rota. */
|
|
11
|
+
export interface MapRouteStep {
|
|
12
|
+
/** Instrução já pronta, no idioma do app ("Vire à direita na Rua Augusta"). */
|
|
13
|
+
readonly instruction: string;
|
|
14
|
+
readonly maneuver: MapManeuver;
|
|
15
|
+
/** Distância do passo, em metros. */
|
|
16
|
+
readonly distance: number;
|
|
17
|
+
/** Duração do passo, em segundos. */
|
|
18
|
+
readonly duration: number;
|
|
19
|
+
/** Nome da via. */
|
|
20
|
+
readonly name?: string;
|
|
21
|
+
/** Onde a manobra acontece (o mapa centra aqui quando o passo fica ativo). */
|
|
22
|
+
readonly location?: LatLngLike;
|
|
23
|
+
}
|
|
24
|
+
/** Rota já calculada pelo serviço do app. */
|
|
25
|
+
export interface MapRoute {
|
|
26
|
+
/** Identificador estável (emitido por `routeSelect`). */
|
|
27
|
+
readonly id: string;
|
|
28
|
+
/** Nome curto ("Pela Av. Paulista"). */
|
|
29
|
+
readonly label?: string;
|
|
30
|
+
/** Linha da rota, do começo ao fim. */
|
|
31
|
+
readonly points: readonly LatLngLike[];
|
|
32
|
+
readonly steps: readonly MapRouteStep[];
|
|
33
|
+
/** Distância total em metros. Sem ela, a soma dos passos (ou o comprimento da linha). */
|
|
34
|
+
readonly distance?: number;
|
|
35
|
+
/** Duração total em segundos. Sem ela, a soma dos passos. */
|
|
36
|
+
readonly duration?: number;
|
|
37
|
+
}
|
|
38
|
+
export interface MapRouteTotals {
|
|
39
|
+
/** Metros. */
|
|
40
|
+
readonly distance: number;
|
|
41
|
+
/** Segundos. */
|
|
42
|
+
readonly duration: number;
|
|
43
|
+
}
|
|
44
|
+
/** Comprimento da linha, em metros (haversine entre pontos consecutivos). */
|
|
45
|
+
export declare function routeLength(points: readonly LatLngLike[]): number;
|
|
46
|
+
/** Distância e duração totais: os valores da rota, ou a soma dos passos (distância: o comprimento da linha sem passos). */
|
|
47
|
+
export declare function routeTotals(route: MapRoute): MapRouteTotals;
|
|
48
|
+
/** Menor retângulo com as linhas e os locais dos passos de uma ou mais rotas. `null` sem pontos. */
|
|
49
|
+
export declare function routeBounds(routes: MapRoute | readonly MapRoute[]): LatLngBounds | null;
|
|
50
|
+
/** Local do passo: `location`, ou o 1º ponto da linha para o 1º passo e o último para o último. `null` se não há como saber. */
|
|
51
|
+
export declare function routeStepLocation(route: MapRoute, index: number): LatLng | null;
|
|
52
|
+
/**
|
|
53
|
+
* Trecho da linha que o passo percorre: do ponto mais perto do local do passo até o ponto mais perto do
|
|
54
|
+
* local do passo seguinte (ou o fim). Vazio quando o passo não tem local.
|
|
55
|
+
*/
|
|
56
|
+
export declare function routeStepSegment(route: MapRoute, index: number): LatLng[];
|
|
57
|
+
export type RouteUnits = 'metric' | 'imperial';
|
|
58
|
+
/**
|
|
59
|
+
* Distância para ler numa lista de direções: métrico (`350 m`, `1,2 km`, `15 km`) ou imperial
|
|
60
|
+
* (`500 ft`, `0.8 mi`, `12 mi`), com o separador e a unidade do idioma (`Intl.NumberFormat` com `unit`).
|
|
61
|
+
* Arredonda como os aplicativos de navegação: abaixo de 1 km de 10 em 10 m (de 1 em 1 abaixo de 100 m),
|
|
62
|
+
* uma casa decimal até 10 km.
|
|
63
|
+
*/
|
|
64
|
+
export declare function formatRouteDistance(meters: number, locale?: string, units?: RouteUnits): string;
|
|
65
|
+
/**
|
|
66
|
+
* Duração para ler numa lista de direções: `45 s`, `12 min`, `1 h 5 min` (unidades curtas do idioma).
|
|
67
|
+
* Acima de um minuto arredonda para o minuto.
|
|
68
|
+
*/
|
|
69
|
+
export declare function formatRouteDuration(seconds: number, locale?: string): string;
|
|
70
|
+
/** Ícone do catálogo e rotação (graus, sentido horário) que desenham a manobra. Decorativo: a instrução diz tudo. */
|
|
71
|
+
export interface ManeuverIcon {
|
|
72
|
+
readonly icon: 'arrow' | 'map-marker' | 'flag' | 'undo' | 'refresh' | 'arrow-forward' | 'boat';
|
|
73
|
+
readonly rotation: number;
|
|
74
|
+
}
|
|
75
|
+
/** Ícone e rotação da manobra; manobra desconhecida vira "siga em frente". */
|
|
76
|
+
export declare function maneuverIcon(maneuver: MapManeuver | string): ManeuverIcon;
|
|
77
|
+
/** Normaliza graus para [0, 360). */
|
|
78
|
+
export declare function normalizeHeading(degrees: number): number;
|
|
79
|
+
/** Ponto cardeal/colateral mais perto do rumo (0 = norte, 90 = leste). */
|
|
80
|
+
export declare function headingCardinal(degrees: number): 'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw';
|