-2

How can I change the color of my marker?

var geometryArray = JSON.parse(geometry);
                        //Collecting the different types of land use in different layers 
                        switch (type){
                            case 'nature':{
                                var layer = L.geoJSON(geometryArray);                               
                                layer.bindPopup("Type: " + type + "<br/>Place: " + place);
                                layer.addTo(naturelayer);


                                break;
                            }
                             case 'culture':{
                                var layer = L.geoJSON(geometryArray);
                                layer.bindPopup("Type: " + type + "<br/>Name: " + place);
                                layer.addTo(culturelayer);

                                break;
                            }
                        };

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.