File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,13 @@ var map;
11
11
12
12
13
13
14
+ var domain = document . location . origin ;
14
15
var init = function ( locationName , zoomLevel ) {
15
- //zoomLevel = 8;
16
- //var locationName = "Cambrige";
17
- if ( ! map ) {
18
- var geoCodingAPI_URL = "http://localhost:8080/api/2/" ;
16
+ //zoomLevel = 8;
17
+ //var locationName = "Cambrige";
18
+ if ( ! map ) {
19
+ var geoCodingAPI_URL = domain + "/api/2/" ;
20
+ // var geoCodingAPI_URL = "http://localhost:8080/api/2/";
19
21
$ . getJSON ( geoCodingAPI_URL + locationName ) . success ( function ( json ) {
20
22
// convert name to coordinates using /api/2/
21
23
var centerLocation = L . latLng ( json [ "results" ] [ 0 ] [ "geometry" ] [ "location" ] [ "lat" ] ,
@@ -44,7 +46,7 @@ var init = function(locationName,zoomLevel) {
44
46
45
47
46
48
var zoomTo = function ( locationName , zoomLevel ) {
47
- var geoCodingAPI_URL = "http://localhost:8080/ api/2/";
49
+ var geoCodingAPI_URL = domain + "/ api/2/England /";
48
50
$ . getJSON ( geoCodingAPI_URL + locationName ) . success ( function ( json ) {
49
51
// convert name to coordinates using /api/2/
50
52
var centerLocation = L . latLng ( json [ "results" ] [ 0 ] [ "geometry" ] [ "location" ] [ "lat" ] ,
You can’t perform that action at this time.
0 commit comments