Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions config/userdata.js.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ var userInfo = {
userFollow: true,
gMapsAPIKey: "YOUR_API_KEY_HERE",
botPath: true,
usePokemonGoMapStyle: true
actionsEnabled: false,
usePokemonGoMapStyle: true
};
//milliseconds
var dataUpdates = {
updateTrainer: 1000,
addCatchable: 1000,
addInventory: 5000
};
};
20 changes: 11 additions & 9 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ var mapView = {
'1002': 'Item Storage Upgrade'
},
settings: {},
mapStyles: {
pokemonGo: [
{ "featureType": "road", "elementType": "geometry.fill", "stylers": [ { "color": "#4f9f92" }, { "visibility": "on" } ] },
{ "featureType": "water", "elementType": "geometry.stroke", "stylers": [ { "color": "#feff95" }, { "visibility": "on" }, { "weight": 1.2 } ] },
{ "featureType": "landscape", "elementType": "geometry", "stylers": [ { "color": "#adff9d" }, { "visibility": "on" } ] },
{ "featureType": "water", "stylers": [ { "visibility": "on" }, { "color": "#147dd9" } ] },
{ "featureType": "poi", "elementType": "geometry.fill", "stylers": [ { "color": "#d3ffcc" } ] },{ "elementType": "labels", "stylers": [ { "visibility": "off" } ] }
]
},
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@geminiyellow Moved the styling here.

init: function() {
var self = this;
self.settings = $.extend(true, self.settings, userInfo, dataUpdates);
Expand Down Expand Up @@ -274,22 +283,15 @@ var mapView = {

},
initMap: function() {
var self = this,
mapStyle1 = [
{ "featureType": "road", "elementType": "geometry.fill", "stylers": [ { "color": "#4f9f92" }, { "visibility": "on" } ] },
{ "featureType": "water", "elementType": "geometry.stroke", "stylers": [ { "color": "#feff95" }, { "visibility": "on" }, { "weight": 1.2 } ] },
{ "featureType": "landscape", "elementType": "geometry", "stylers": [ { "color": "#adff9d" }, { "visibility": "on" } ] },
{ "featureType": "water", "stylers": [ { "visibility": "on" }, { "color": "#147dd9" } ] },
{ "featureType": "poi", "elementType": "geometry.fill", "stylers": [ { "color": "#d3ffcc" } ] },{ "elementType": "labels", "stylers": [ { "visibility": "off" } ] }
];
var self = this;
self.map = new google.maps.Map(document.getElementById('map'), {
center: {
lat: 50.0830986,
lng: 6.7613762
},
zoom: 8,
mapTypeId: 'roadmap',
styles: ((self.settings.usePokemonGoMapStyle || self.settings.usePokemonGoMapStyle == undefined) ? mapStyle1 : []) // disable Pokemon Go map style only when explicitly instructed to
styles: ((self.settings.usePokemonGoMapStyle || self.settings.usePokemonGoMapStyle === undefined) ? self.mapStyles.pokemonGo : []) // disable Pokemon Go map style only when explicitly instructed to
});
self.placeTrainer();
self.addCatchable();
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.