Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On hover of a custom image point on google chrome - image is loaded again and again #469

Open
theurere2 opened this issue Apr 9, 2021 · 0 comments

Comments

@theurere2
Copy link

theurere2 commented Apr 9, 2021

When using a custom image for a point on the map in google chrome the image is loaded again and again on image hover. Using google chrome version 89.0.4389.114. My map settings are:

    jquery("#" + MAP_ID).vectorMap({
        backgroundColor: "white",
        regionStyle: {
            initial: {
                fill: "#ecf0f1",
                stroke: "#9aaaab",
                "stroke-width": 1,
            },
            hover: {
                fill: "#959595",
                "fill-opacity": 1,
            },
        },
        markerStyle: {
            initial: {
                fill: "#319b42",
                image: "/typo3conf/ext/example/Resources/Public/Images/map-marker.png",
            },
        },
        map: map,
        markersSelectable: true,
        markersSelectableOne: true,
        markers: markers,
        onMarkerClick: function (evt: object, code: string) {
            //console.log('evt', evt, 'code', code);
            let markerId = "#map-marker-" + continent + "-" + code;
            jquery(markerId).siblings().removeClass("open");
            jquery(markerId).addClass("open");
            jquery(markerId + " .icon-x").click(function () {
                jquery(markerId).removeClass("open");
            });
        },
        zoomOnScroll: false
    });

See attached screenshot.
Screen Shot 2021-04-09 at 14 26 57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant