I currently render a google map on my website using the below code to display it and place the markers on the map.
// Creating a new map
//UK Cordinates 55.37911,-3.427734 zoom 9
var map = new google.maps.Map(document.getElementById("map"), {
center: new google.maps.LatLng(54.901882,-3.603516),
zoom: 6,
panControl: false,
scrollwheel: false,
mapTypeControl: false,
streetViewControlOptions: {position: google.maps.ControlPosition.LEFT_CENTER},
zoomControlOptions: {position: google.maps.ControlPosition.LEFT_CENTER},
mapTypeId: google.maps.MapTypeId.ROADMAP
// Creating the JSON data
var json = [
{
"title": "BLAH",
"lat": 51.514979,
"lng": -0.134175,
"description": "BLAHBLAHBLAH"
},
{
"title": "BLAH",
"lat": 51.512779,
"lng": -0.132625,
"description": "BLAHBALH"
},
{
"title": "BLAH",
"lat": 51.489025,
"lng": -0.191840,
"description": "BLAHBLAH"
},
I would like to make only certain markers appear green instead of the standard red. There is a lot of information on how to do this across the web, however, not through the method that my markers are placed (JSON data). A previous designer made this so I'm unsure!
Many thanks!