Skip to content

Commit

Permalink
#3045: Added links to location marker popups
Browse files Browse the repository at this point in the history
LinkTo doesn't work in different entry point, need to sync histories
  • Loading branch information
cemalettin-work committed Oct 13, 2020
1 parent 74fe0dc commit b1f24e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions client/src/components/Leaflet.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const css = {
}

class CustomUrlEsriProvider extends EsriProvider {
constructor(searchUrl: string, options = {}) {
constructor(searchUrl, options = {}) {
super(options)
if (searchUrl) {
if (searchUrl.startsWith("http://") || searchUrl.startsWith("https://")) {
Expand Down Expand Up @@ -300,10 +300,13 @@ const BaseLeaflet = ({
})
.bindPopup(popupContent)
.on("popupopen", e => {
// TODO LinkTo component will be utilized here to provide routing
ReactDOM.render(
<>
<b>{location.name}</b> @{" "}
<b>
{/* // TODO: Find a way to work with LinkTo in different entry point here, not nested inside Router context */}
<a href={`/locations/${location.uuid}`}>{location.name}</a>
</b>{" "}
@{" "}
<GeoLocation
coordinates={{
lat: location.lat,
Expand Down

0 comments on commit b1f24e5

Please sign in to comment.