Choosing marker colours
-
Hello,
so I’m updating my code so- I am creating maps on the fly based on archival reports from the Royal Navy of where all their ships were on a particular date in the 17th C. (To see what I’m doing- go to choose a report, then any one from the list, and you’ll see- A map should come up)I have different kinds of reports, and I’d like to change the colour of the marker depending on the type of report (Eg blue = deployment report, red = status report, yellow = fleet list). I’ve seen where you said you can use SVG Markers, but I can’t’ seem to get this to work. While I’m using wordpress, I’m mostly working around it- creating HTML instead of actually using my theme.
`function print_deployment_map($array_of_locations)
{
//this is using the leaflet app
echo do_shortcode(“[leaflet-map fitbounds zoomcontrol]”);
foreach( $array_of_locations as $marker)
{
//var_dump ($marker);
//echo ‘<br>’;
echo do_shortcode(“[leaflet-marker svg=”true” background=\”$marker[4]\” lat=\”$marker[1]\” lng=\”$marker[2]\”]$marker[0][/leaflet-marker]”);
}
}Im just wondering where I’m going wrong.
Thanks.
The page I need help with: [log in to see the link]
The topic ‘Choosing marker colours’ is closed to new replies.