You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[5982],{29160:function(e,n,t){var o=t(12739),r=t(41376),a=t(70492),i=t(75469),s=t(76166),c=t(95783),p=t(54354),l=t(69039),u=t(24598),m=t(41372),v=t(42010),w=new o.Z({geometry:new i.Z([0,0]),name:"Null Island",population:4e3,rainfall:500}),g=new l.ZP({image:new u.Z({anchor:[.5,46],anchorXUnits:"fraction",anchorYUnits:"pixels",src:"data/icon.png"})});w.setStyle(g);var f=new c.Z({features:[w]}),d=new m.Z({source:f}),h=new v.Z({source:new s.Z({url:"https://a.tiles.mapbox.com/v3/aj.1x1-degrees.json?secure=1",crossOrigin:""})}),Z=new r.Z({layers:[h,d],target:document.getElementById("map"),view:new p.ZP({center:[0,0],zoom:3})}),x=document.getElementById("popup"),y=new a.Z({element:x,positioning:"bottom-center",stopEvent:!1});Z.addOverlay(y),Z.on("click",(function(e){var n=Z.forEachFeatureAtPixel(e.pixel,(function(e){return e}));n?(y.setPosition(e.coordinate),$(x).popover({placement:"top",html:!0,content:n.get("name")}),$(x).popover("show")):$(x).popover("dispose")})),Z.on("pointermove",(function(e){var n=Z.getEventPixel(e.originalEvent),t=Z.hasFeatureAtPixel(n);Z.getTarget().style.cursor=t?"pointer":""})),Z.on("movestart",(function(){$(x).popover("dispose")}))}},function(e){var n=function(n){return e(e.s=n)};n(9877),n(29160)}]);
|
|
//# sourceMappingURL=icon.js.map
|