Friday, 15 February 2013

javascript - Clip Google Maps JS API ImageMapType to a polygon -



javascript - Clip Google Maps JS API ImageMapType to a polygon -

how can clip maptype in google maps arbitrary polygon. example, if have custom imagemaptype covers big area (i.e. world), want show within given polygon (i.e. 1 country).

is there way clip imagemaptype given polygon, or implement custom maptype accomplish behaviour? should allow zooming , panning normally.

the rest of map should remain same, , there maptype covering specific area. therefore, not possible overlay polygon cover areas outside polygon display needed.

like so:

server-side clipping not option.

you place div above map, absolute positioning , high z-index. then, apply polygon mask div this: -webkit-clip-path: polygon(0 0, 0 100%, 100% 0);

javascript google-maps google-maps-api-3

No comments:

Post a Comment