Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm using 'leaflet.js' placing popup markers on a map and also using geolocation to get the users current location on the map. A blue default

I'm using 'leaflet.js' placing popup markers on a map and also using geolocation to get the users current location on the map.

A blue default popup is set for each marker I set. //eg,engineering building

var engBuilding = L.marker([43.283793,-14.5334348]).bindPopup('Engineering Building');

Is there any way I can use CSS to change the popup marker color to red for the geolocation marker??

Here is my geolocation code:

//geolcation marker function onLocationFound(e) { var radius = e.accuracy / 2; L.marker(e.latlng).addTo(map) .bindPopup("You are currently here").openPopup(); L.circle(e.latlng, radius).addTo(map); } function onLocationError(e) { alert(e.message); } map.on('locationfound', onLocationFound); map.on('locationerror', onLocationError); map.locate({setView: true, maxZoom: 16}); var newMarker = new L.marker(e.latlng).addTo(map);

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Algorithmic Trading Navigating The Digital Frontier

Authors: Alex Thompson

1st Edition

B0CHXR6CXX, 979-8223284987

More Books

Students also viewed these Databases questions

Question

Explain how conflict styles differ across cultures

Answered: 1 week ago

Question

what is the most common cause of preterm birth in twin pregnancies?

Answered: 1 week ago

Question

Which diagnostic test is most commonly used to confirm PROM?

Answered: 1 week ago

Question

What is the hallmark clinical feature of a molar pregnancy?

Answered: 1 week ago

Question

Conduct an effective performance feedback session. page 360

Answered: 1 week ago