Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1065
Clear previous objects while Reloading a new shape file
posted

Hi,

I am loading States shape file displaying tool tips and markers. On click on the state I am showing counties as markers. But I am seeing the state labels. Can I clear all the objects while loading a new shape file? Can you explain?

Thanks,

Pavan.

Parents
No Data
Reply
  • 1775
    Verified Answer
    posted

    Hi, Pavan

    You can simply remove the markers from the state series. You can achieve this with code like the following:

    1. $("#map").igMap("option", "series",
    2.     [{
    3.         name: "statesSeries",
    4.         markerType: "none"
    5.     }]
    6. );

    The markerType: “none” assignment specifies that you do not want markers in the series specified by the name option. After this executes the control removes the markers.

    If you want to remove the state series in general and leave only counties series, do the following:

    1. $("#map").igMap("option", "series",
    2.     [{
    3.         name: "statesSeries",
    4.         remove: true
    5.     }]
    6. );

    Cheers, Lazar 

Children
No Data