Skip to content

Commit

Permalink
Find place on the map
Browse files Browse the repository at this point in the history
  • Loading branch information
erssebaggala committed Oct 15, 2019
1 parent 235cb3b commit 1a35091
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
22 changes: 21 additions & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,24 @@ $ sudo apt install snapd
# Install Boda-Lite span package
$ sudo snap install Boda-Lite_VERSION_amd64.snap
```
```

## Using PostgreSQL without installation
Below are the steps to follow:
### Running on Windows
1. Create a folder for you postgres download (POSTGRES_FOLDER).
2. Launch **cmd** and go to POSTGRES_FOLDER <br />
`cd POSTGRES_FOLDER`
3. Download PostgreSQL using the download script bundled with Boda-Lite <br />
`
C:\Users\<USERNAME>\AppData\Local\Programs\Boda-Lite\resources\db\scripts\download_postgres.bat
`
4. Initialize PostgreSQL <br />
`
PostreSQL\pgsql\bin\initdb.exe -D ..\data --username=postgres -auth=trust
`
5. Run PostgreSQL database <br />
`PostreSQL\pgsql\bin\pg_ctl.exe start -D ../data`


From the above setup, PostgreSQL is running on **localhost** on port **5432** and default user **postgres** with no password.
8 changes: 7 additions & 1 deletion src/modules/gis/GISMap.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react'
import { connect } from 'react-redux';
import {
withLeaflet,
Map,
TileLayer,
Popup,
Expand Down Expand Up @@ -55,9 +56,10 @@ import 'leaflet-contextmenu'
import 'leaflet-contextmenu/dist/leaflet.contextmenu.css'
import 'leaflet.icon.glyph'
import { renderToString } from 'react-dom/server'
import { ReactLeafletSearch } from 'react-leaflet-search'

const { ipcRenderer} = window.require("electron");

const WrappedSearch = withLeaflet(ReactLeafletSearch)

//Fix icons
delete L.Icon.Default.prototype._getIconUrl;
Expand Down Expand Up @@ -560,6 +562,10 @@ class GISMap extends React.Component{
}]}
fullscreenControl
>
<WrappedSearch
zoom={12}
inputPlaceholder="Find a place"
position="topleft"/>

<TileLayer
attribution="&amp;copy <a href=&quot;http://osm.org/copyright&quot;>OpenStreetMap</a> contributors"
Expand Down

0 comments on commit 1a35091

Please sign in to comment.