Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
InstiApp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
RAHUL SHARMA
InstiApp
Commits
a2baf562
Commit
a2baf562
authored
May 29, 2017
by
Sajal Narang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove custom map style
parent
356d6b65
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
216 deletions
+3
-216
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
.../ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
+0
-1
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/MapFragment.java
...va/in/ac/iitb/gymkhana/iitbapp/fragments/MapFragment.java
+2
-24
app/src/main/res/raw/style_json.json
app/src/main/res/raw/style_json.json
+0
-191
gradle.properties
gradle.properties
+1
-0
No files found.
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/CalendarFragment.java
View file @
a2baf562
...
@@ -9,7 +9,6 @@ import android.view.ViewGroup;
...
@@ -9,7 +9,6 @@ import android.view.ViewGroup;
import
in.ac.iitb.gymkhana.iitbapp.R
;
import
in.ac.iitb.gymkhana.iitbapp.R
;
/**
/**
* A simple {@link Fragment} subclass.
* A simple {@link Fragment} subclass.
*/
*/
...
...
app/src/main/java/in/ac/iitb/gymkhana/iitbapp/fragments/MapFragment.java
View file @
a2baf562
package
in.ac.iitb.gymkhana.iitbapp.fragments
;
package
in.ac.iitb.gymkhana.iitbapp.fragments
;
import
android.content.res.Resources
;
import
android.os.Bundle
;
import
android.os.Bundle
;
import
android.support.v4.app.Fragment
;
import
android.support.v4.app.Fragment
;
import
android.util.Log
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
...
@@ -13,7 +11,6 @@ import com.google.android.gms.maps.GoogleMap;
...
@@ -13,7 +11,6 @@ import com.google.android.gms.maps.GoogleMap;
import
com.google.android.gms.maps.OnMapReadyCallback
;
import
com.google.android.gms.maps.OnMapReadyCallback
;
import
com.google.android.gms.maps.SupportMapFragment
;
import
com.google.android.gms.maps.SupportMapFragment
;
import
com.google.android.gms.maps.model.LatLng
;
import
com.google.android.gms.maps.model.LatLng
;
import
com.google.android.gms.maps.model.MapStyleOptions
;
import
com.google.android.gms.maps.model.MarkerOptions
;
import
com.google.android.gms.maps.model.MarkerOptions
;
import
in.ac.iitb.gymkhana.iitbapp.R
;
import
in.ac.iitb.gymkhana.iitbapp.R
;
...
@@ -26,7 +23,7 @@ public class MapFragment extends Fragment implements OnMapReadyCallback {
...
@@ -26,7 +23,7 @@ public class MapFragment extends Fragment implements OnMapReadyCallback {
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
public
View
onCreateView
(
LayoutInflater
inflater
,
ViewGroup
container
,
Bundle
savedInstanceState
)
{
Bundle
savedInstanceState
)
{
// Inflate the layout for this fragment
// Inflate the layout for this fragment
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_map
,
container
,
false
);
View
view
=
inflater
.
inflate
(
R
.
layout
.
fragment_map
,
container
,
false
);
gMapFragment
=
(
SupportMapFragment
)
this
.
getChildFragmentManager
().
findFragmentById
(
R
.
id
.
viewMap
);
gMapFragment
=
(
SupportMapFragment
)
this
.
getChildFragmentManager
().
findFragmentById
(
R
.
id
.
viewMap
);
gMapFragment
.
getMapAsync
(
this
);
gMapFragment
.
getMapAsync
(
this
);
...
@@ -37,29 +34,10 @@ public class MapFragment extends Fragment implements OnMapReadyCallback {
...
@@ -37,29 +34,10 @@ public class MapFragment extends Fragment implements OnMapReadyCallback {
@Override
@Override
public
void
onMapReady
(
GoogleMap
googleMap
)
{
public
void
onMapReady
(
GoogleMap
googleMap
)
{
try
{
// Customise the styling of the base map using a JSON object defined
// in a raw resource file.
boolean
success
=
googleMap
.
setMapStyle
(
MapStyleOptions
.
loadRawResourceStyle
(
getContext
(),
R
.
raw
.
style_json
));
if
(!
success
)
{
Log
.
e
(
"TAG"
,
"Style parsing failed."
);
}
}
catch
(
Resources
.
NotFoundException
e
)
{
Log
.
e
(
"TAG"
,
"Can't find style. Error: "
,
e
);
}
// Position the map's camera near Mumbai
// Position the map's camera near Mumbai
LatLng
iitb
=
new
LatLng
(
19.1334
,
72.9133
);
LatLng
iitb
=
new
LatLng
(
19.1334
,
72.9133
);
googleMap
.
addMarker
(
new
MarkerOptions
().
position
(
iitb
)
googleMap
.
addMarker
(
new
MarkerOptions
().
position
(
iitb
)
.
title
(
"Marker in IITB"
));
.
title
(
"Marker in IITB"
));
googleMap
.
moveCamera
(
CameraUpdateFactory
.
newLatLng
(
iitb
));
googleMap
.
moveCamera
(
CameraUpdateFactory
.
newLatLng
(
iitb
));
}
}
}
\ No newline at end of file
}
app/src/main/res/raw/style_json.json
deleted
100644 → 0
View file @
356d6b65
[
{
"featureType"
:
"all"
,
"elementType"
:
"geometry"
,
"stylers"
:
[
{
"color"
:
"#242f3e"
}
]
},
{
"featureType"
:
"all"
,
"elementType"
:
"labels.text.stroke"
,
"stylers"
:
[
{
"lightness"
:
-80
}
]
},
{
"featureType"
:
"administrative"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#746855"
}
]
},
{
"featureType"
:
"administrative.locality"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#d59563"
}
]
},
{
"featureType"
:
"poi"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#d59563"
}
]
},
{
"featureType"
:
"poi.park"
,
"elementType"
:
"geometry"
,
"stylers"
:
[
{
"color"
:
"#263c3f"
}
]
},
{
"featureType"
:
"poi.park"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#6b9a76"
}
]
},
{
"featureType"
:
"road"
,
"elementType"
:
"geometry.fill"
,
"stylers"
:
[
{
"color"
:
"#2b3544"
}
]
},
{
"featureType"
:
"road"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#9ca5b3"
}
]
},
{
"featureType"
:
"road.arterial"
,
"elementType"
:
"geometry.fill"
,
"stylers"
:
[
{
"color"
:
"#38414e"
}
]
},
{
"featureType"
:
"road.arterial"
,
"elementType"
:
"geometry.stroke"
,
"stylers"
:
[
{
"color"
:
"#212a37"
}
]
},
{
"featureType"
:
"road.highway"
,
"elementType"
:
"geometry.fill"
,
"stylers"
:
[
{
"color"
:
"#746855"
}
]
},
{
"featureType"
:
"road.highway"
,
"elementType"
:
"geometry.stroke"
,
"stylers"
:
[
{
"color"
:
"#1f2835"
}
]
},
{
"featureType"
:
"road.highway"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#f3d19c"
}
]
},
{
"featureType"
:
"road.local"
,
"elementType"
:
"geometry.fill"
,
"stylers"
:
[
{
"color"
:
"#38414e"
}
]
},
{
"featureType"
:
"road.local"
,
"elementType"
:
"geometry.stroke"
,
"stylers"
:
[
{
"color"
:
"#212a37"
}
]
},
{
"featureType"
:
"transit"
,
"elementType"
:
"geometry"
,
"stylers"
:
[
{
"color"
:
"#2f3948"
}
]
},
{
"featureType"
:
"transit.station"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#d59563"
}
]
},
{
"featureType"
:
"water"
,
"elementType"
:
"geometry"
,
"stylers"
:
[
{
"color"
:
"#17263c"
}
]
},
{
"featureType"
:
"water"
,
"elementType"
:
"labels.text.fill"
,
"stylers"
:
[
{
"color"
:
"#515c6d"
}
]
},
{
"featureType"
:
"water"
,
"elementType"
:
"labels.text.stroke"
,
"stylers"
:
[
{
"lightness"
:
-20
}
]
}
]
gradle.properties
View file @
a2baf562
...
@@ -16,4 +16,5 @@ org.gradle.jvmargs=-Xmx1536m
...
@@ -16,4 +16,5 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true
# TODO Replace Key and put in local:properties
GOOGLE_MAPS_API_KEY
=
AIzaSyB72DhM4E1NW0F-_SLnYtYYvz0rT9kne-U
GOOGLE_MAPS_API_KEY
=
AIzaSyB72DhM4E1NW0F-_SLnYtYYvz0rT9kne-U
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment