From e84d6bd6245b307b5805d625141e7293f65bf7fb Mon Sep 17 00:00:00 2001 From: Jan-Piet Mens Date: Sun, 16 Aug 2015 12:51:06 +0200 Subject: [PATCH] Make GOOG revcoding URL configurable (for key) --- .gitignore | 1 + Makefile | 2 +- README.md | 1 + config.h | 3 --- config.h.example | 11 +++++++++++ 5 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 config.h create mode 100644 config.h.example diff --git a/.gitignore b/.gitignore index 98b8ac4..c4e10de 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ ocat store/ jpm-test/ config.mk +config.h diff --git a/Makefile b/Makefile index 45f43b6..5b44d55 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ ot-reader: ot-reader.c json.o utstring.h ghash.o mkpath.o jget.o ot-recorder: ot-recorder.c json.o utarray.h utstring.h geo.o geohash.o mkpath.o file.o safewrite.o base64.o ghash.o config.h udata.h misc.o $(CC) $(CFLAGS) ot-recorder.c -o ot-recorder json.o geo.o geohash.o mkpath.o file.o safewrite.o base64.o ghash.o misc.o $(LIBS) -geo.o: geo.h geo.c udata.h Makefile config.mk +geo.o: geo.h geo.c udata.h Makefile config.mk config.h geohash.o: geohash.h geohash.c udata.h Makefile config.mk file.o: file.h file.c config.h misc.h Makefile config.mk base64.o: base64.h base64.c diff --git a/README.md b/README.md index e843c17..6bd3370 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ Recorder ## Installation +1. Copy `config.h.example` to `config.h` 1. Edit `config.h` 2. Edit `config.mk` and select features 2. Type `make` diff --git a/config.h b/config.h deleted file mode 100644 index cf8c0e7..0000000 --- a/config.h +++ /dev/null @@ -1,3 +0,0 @@ -#define JSONDIR "store" - -#define GEOHASH_PREC (7) diff --git a/config.h.example b/config.h.example new file mode 100644 index 0000000..54582dc --- /dev/null +++ b/config.h.example @@ -0,0 +1,11 @@ +#define JSONDIR "store" + +#define GEOHASH_PREC (7) + +/* + * Google Maps reverse geocoding URL. + * If you need to use an API KEY, change the scheme to "https:" + * and add "&key=xxxxx" to the end of this URL + */ + +#define GURL "http://maps.googleapis.com/maps/api/geocode/json?latlng=%lf,%lf&sensor=false&language=EN"