Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

520
Views
How to add layers in Azure Maps

I am using Azure Maps and I would like to toggle between two layers on click of a button.

Two layers that I am using are HTML marker and Symbol layers.

Currently , I am able to display both these layers on page load in javascript. However , I would like to toggle these layers on click of a button.

Edit --

Basically we would like a add layers similar to the pic so that we can toggle.

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Use the visible option. When you want to toggle the state of one layer, get the layer options using getOptions, then check the visible option and reverse its value, then set it on the layer again. For example:

layer.setOptions({ visible: !layer.getOptions().visible });

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!