Thoughts, information and reflections about technology

Image maps will break in edge if the coords are not on one line.

I had a United States map that used an image map to allow users to click on the state of their choice. It worked fine in Chrome, Firefox and IE 10.

HOWEVER, when I viewed it in MS Edge, the only state that was working was Utah (I am only mapping selected states”

I noticed that my coords statement for Utah was all on one line whereas Texas and all the other states were  on several lines.

I had originally put linefeeds in so that the coords statement didn’t run endlessly to the right to improve readability.

For example, Texas looked as follows:

 coords=”304,256,347,258,345,290,350,293,358,294,359,297, 364,298,368,299,374,299,378,303,381,301,383,303,389,304,389,306,392,302, 395,304,397,303,401,305,407,303,411,304,413,302,415,303,419,301,429,307, 430,308,436,308,437,333,441,338,443,342,445,347,444,357,444,367,441,372, 428,377,425,378,420,385,405,393,398,395,394,397,389,402,385,414,384,418, 384,427,388,433,384,436,379,433,369,432,366,429,359,427,356,426,349,412, 350,406,346,405,336,393,330,379,320,371,312,368,306,368,299,369,297,376, 292,381,287,380,279,374,269,368,269,362,268,356,262,349,256,344,251,338, 247,335,242,329,242,327,298,331,304,256″
href=”#” name=”texas” shape=”poly” target=”Texas”>

After removing the linefeeds at the end of each line for all the states I had mapped, the imagemap now renders as expected in Edge.

Similar Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact me