Hey there, Based on the code here figured out how to show my own location with a marker. However, how would I add to the code if I also want it to display a list of doctor providers or restaurants etc.
for example near my location? thanksLet’s start with the basics. What is your source going to be? A fixed table? API calls to i.e. Google or Yelp? Firebase? Other?
Thanks I already have a firebase link to database and url setup since I have a user login and password screen first. I am working on this for a middle school project so sorry for basic questions its my first time.
You need to have a list of coordinates, and associated info.
Do you have those info?
I could help.
you should go to google maps style wizard and change the labels so that only government services are visible.
Paste this code into the “custom map string” field in advanced map settings.
[
{
“featureType”: “administrative”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.attraction”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.business”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.government”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.park”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.place_of_worship”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.school”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.sports_complex”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.arterial”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.highway”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.local”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.line”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station.airport”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station.bus”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station.rail”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
}
]
Sorry, this code.
[
{
“featureType”: “administrative”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “administrative”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.attraction”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.attraction”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.business”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.business”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.government”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.government”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.park”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.park”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.place_of_worship”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.place_of_worship”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.school”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.school”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.sports_complex”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “poi.sports_complex”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.arterial”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.arterial”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.highway”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.highway”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.local”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “road.local”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit”,
“elementType”: “labels.icon”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.line”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station.airport”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station.bus”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
},
{
“featureType”: “transit.station.rail”,
“elementType”: “labels.text”,
“stylers”: [
{
“visibility”: “off”
}
]
}
]
Nice! Does this automatically add markers? Or does this just take stuff off the map?
It takes the labels of the map