Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. problem to remove single marker in google maps api

problem to remove single marker in google maps api

Scheduled Pinned Locked Moved C#
databasedata-structuresjsonhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asaf Shay
    wrote on last edited by
    #1

    in my example it's show that I put only one marker but lets say I add much more markers and I only want to remove marker in my array in index 0.

    protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
    {
    if (CheckBox1.Checked == true)
    {
    GMap1.addGMarker(markers1[0]);
    }
    else
    {
    //i dont know what to write here

        }
    }
    
    L 1 Reply Last reply
    0
    • A Asaf Shay

      in my example it's show that I put only one marker but lets say I add much more markers and I only want to remove marker in my array in index 0.

      protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
      {
      if (CheckBox1.Checked == true)
      {
      GMap1.addGMarker(markers1[0]);
      }
      else
      {
      //i dont know what to write here

          }
      }
      
      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      ..and who told you what to write in the first "if"? The "addGMarker" method returns an object, and according to the documentation one could call the "remove" method on that object. Says here on the page it's deprecated. What version of GMaps are you using?

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups