Skip to content

Commit

Permalink
#3045: Fix geolocation printing no coordinates
Browse files Browse the repository at this point in the history
  • Loading branch information
cemalettin-work committed Dec 14, 2020
1 parent 25d6aac commit b642f8a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion client/src/components/Leaflet.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Control, CRS, DivIcon, Icon, Map, Marker, TileLayer } from "leaflet"
import AppContext from "components/AppContext"
import { convertLatLngToMGRS } from "geoUtils"
import "leaflet-defaulticon-compatibility"
import "leaflet-defaulticon-compatibility/dist/leaflet-defaulticon-compatibility.webpack.css"
import {
Expand Down Expand Up @@ -282,7 +283,16 @@ const BaseLeaflet = ({
ReactDOM.render(
<>
<b>{location.name}</b> @{" "}
<GeoLocation lat={location.lat} lng={location.lng} />
<GeoLocation
coordinates={{
lat: location.lat,
lng: location.lng,
displayedCoordinate: convertLatLngToMGRS(
location.lat,
location.lng
)
}}
/>
</>,
e.popup.getContent()
)
Expand Down

0 comments on commit b642f8a

Please sign in to comment.