HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URLs added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
#panel-map
script.
const data = [
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Zainoel Abidin Banda Aceh"
},
"geometry": {
"type": "Point",
"coordinates": [
95.3376,
5.563783
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Cut Meutia Lhokseumawe"
},
"geometry": {
"type": "Point",
"coordinates": [
97.969845,
4.469044
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU H. Adam Malik Medan"
},
"geometry": {
"type": "Point",
"coordinates": [
98.608624,
3.518453
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Kabanjahe"
},
"geometry": {
"type": "Point",
"coordinates": [
98.491469,
3.097922
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. Djasamen Saragih"
},
"geometry": {
"type": "Point",
"coordinates": [
99.069745,
2.958206
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Tarutung"
},
"geometry": {
"type": "Point",
"coordinates": [
98.960712,
2.026884
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Padang Sidempuan"
},
"geometry": {
"type": "Point",
"coordinates": [
99.271657,
1.371956
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. M. Jamil Padang"
},
"geometry": {
"type": "Point",
"coordinates": [
100.367508,
-0.943714
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Achmad Mochtar"
},
"geometry": {
"type": "Point",
"coordinates": [
100.366125,
-0.299657
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Arifin Ahmad Pekan Baru"
},
"geometry": {
"type": "Point",
"coordinates": [
101.452178,
0.523389
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Puri Husada"
},
"geometry": {
"type": "Point",
"coordinates": [
103.163154,
-0.322954
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dumai"
},
"geometry": {
"type": "Point",
"coordinates": [
101.459487,
1.678439
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSBP Batam"
},
"geometry": {
"type": "Point",
"coordinates": [
103.93171,
1.129914
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Embung Fatimah"
},
"geometry": {
"type": "Point",
"coordinates": [
103.967811,
1.050628
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Provinsi Kep. Riau Tanjungpinang"
},
"geometry": {
"type": "Point",
"coordinates": [
104.500281,
0.923571
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Muhammad Sani (Kab. Karimun)"
},
"geometry": {
"type": "Point",
"coordinates": [
103.413729,
1.013594
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Raden Mattaher Jambi"
},
"geometry": {
"type": "Point",
"coordinates": [
103.580035,
-1.603462
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. M. Hoesin Palembang"
},
"geometry": {
"type": "Point",
"coordinates": [
104.750221,
-2.966083
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Kayu Agung"
},
"geometry": {
"type": "Point",
"coordinates": [
104.824976,
-3.407915
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kab. Lahat"
},
"geometry": {
"type": "Point",
"coordinates": [
103.534595,
-3.792846
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Siti Fatimah Provinsi Sumatera Selatan"
},
"geometry": {
"type": "Point",
"coordinates": [
104.734485,
-2.948243
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Dr. Rivai Abdullah"
},
"geometry": {
"type": "Point",
"coordinates": [
104.863386,
-2.979684
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. H. Marsidi Judono"
},
"geometry": {
"type": "Point",
"coordinates": [
107.629481,
-2.738785
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Depati Hamzah"
},
"geometry": {
"type": "Point",
"coordinates": [
106.124304,
-2.143958
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. M. Yunus Bengkulu"
},
"geometry": {
"type": "Point",
"coordinates": [
102.31397,
-3.834251
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Arga Makmur"
},
"geometry": {
"type": "Point",
"coordinates": [
102.19115,
-3.442307
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Hasanuddin Damrah Manna"
},
"geometry": {
"type": "Point",
"coordinates": [
102.896553,
-4.441978
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Abdul Moeloek"
},
"geometry": {
"type": "Point",
"coordinates": [
105.258664,
-5.402764
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. H. Bob Bazar,SKM"
},
"geometry": {
"type": "Point",
"coordinates": [
105.596458,
-5.727542
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Mayjend HM Ryacudu"
},
"geometry": {
"type": "Point",
"coordinates": [
104.891447,
-4.832769
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Jend. Ahmad Yani Metro"
},
"geometry": {
"type": "Point",
"coordinates": [
105.31013,
-5.115724
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSPI Dr. Sulianti Saroso"
},
"geometry": {
"type": "Point",
"coordinates": [
106.862318,
-6.129592
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Persahabatan"
},
"geometry": {
"type": "Point",
"coordinates": [
106.884862,
-6.20275
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSPAD Gatot Subroto"
},
"geometry": {
"type": "Point",
"coordinates": [
106.837151,
-6.176575
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUP Fatmawati"
},
"geometry": {
"type": "Point",
"coordinates": [
106.796127,
-6.29512
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Cengkareng"
},
"geometry": {
"type": "Point",
"coordinates": [
106.735097,
-6.142627
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Pasar Minggu"
},
"geometry": {
"type": "Point",
"coordinates": [
106.820186,
-6.293835
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Umum Bhayangkara Tk. I R. Said Sukanto"
},
"geometry": {
"type": "Point",
"coordinates": [
106.870705,
-6.269512
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSAL Mintoharjo"
},
"geometry": {
"type": "Point",
"coordinates": [
106.810937,
-6.210945
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Hasan Sadikin Bandung"
},
"geometry": {
"type": "Point",
"coordinates": [
107.598143,
-6.898065
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Slamet Garut"
},
"geometry": {
"type": "Point",
"coordinates": [
107.897017,
-7.219988
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Gunung Jati"
},
"geometry": {
"type": "Point",
"coordinates": [
108.554741,
-6.729522
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSTP Dr. H.A. Rotinsulu Bandung"
},
"geometry": {
"type": "Point",
"coordinates": [
107.606044,
-6.878794
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Indramayu"
},
"geometry": {
"type": "Point",
"coordinates": [
108.321624,
-6.329465
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD R. Syamsudin, SH Kota Sukabumi"
},
"geometry": {
"type": "Point",
"coordinates": [
106.935146,
-6.915426
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Paru Dr. M. Goenawan Partowidigdo"
},
"geometry": {
"type": "Point",
"coordinates": [
106.938841,
-6.68781
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Tk II 03.05.01 Dustira"
},
"geometry": {
"type": "Point",
"coordinates": [
107.53464,
-6.885274
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. Drajat Prawiranegara"
},
"geometry": {
"type": "Point",
"coordinates": [
106.152616,
-6.119868
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Kab Tangerang"
},
"geometry": {
"type": "Point",
"coordinates": [
106.635084,
-6.200774
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Kariadi Semarang"
},
"geometry": {
"type": "Point",
"coordinates": [
110.407488,
-6.994181
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. H. Soewondo"
},
"geometry": {
"type": "Point",
"coordinates": [
110.206204,
-6.917819
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Moewardi"
},
"geometry": {
"type": "Point",
"coordinates": [
110.84297,
-7.556963
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Banyumas"
},
"geometry": {
"type": "Point",
"coordinates": [
109.292687,
-7.529108
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. Loekmonohadi Kudus"
},
"geometry": {
"type": "Point",
"coordinates": [
110.836557,
-6.81881
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. H. RM Soeselo W"
},
"geometry": {
"type": "Point",
"coordinates": [
109.137713,
-6.993495
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kraton Kab. Pekalongan"
},
"geometry": {
"type": "Point",
"coordinates": [
109.667497,
-6.881386
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Tidar Kota"
},
"geometry": {
"type": "Point",
"coordinates": [
110.21824,
-7.485501
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Prof. Dr. Margono Soekarjo"
},
"geometry": {
"type": "Point",
"coordinates": [
109.267435,
-7.436637
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr Suraji Tirtonegoro"
},
"geometry": {
"type": "Point",
"coordinates": [
110.588719,
-7.714344
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Paru Dr. Ario Wirawan"
},
"geometry": {
"type": "Point",
"coordinates": [
110.489471,
-7.34898
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD K.R.M.T Wongsonegoro Kota Semarang"
},
"geometry": {
"type": "Point",
"coordinates": [
110.466903,
-7.033317
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kardinah Tegal"
},
"geometry": {
"type": "Point",
"coordinates": [
109.135427,
-6.884769
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Sardjito"
},
"geometry": {
"type": "Point",
"coordinates": [
110.373448,
-7.768594
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Panembahan Senopati Bantul"
},
"geometry": {
"type": "Point",
"coordinates": [
110.338105,
-7.892805
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kota Yogyakarta"
},
"geometry": {
"type": "Point",
"coordinates": [
110.378005,
-7.825807
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Wates"
},
"geometry": {
"type": "Point",
"coordinates": [
110.147942,
-7.858827
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Soetomo"
},
"geometry": {
"type": "Point",
"coordinates": [
112.758504,
-7.267987
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Saiful Anwar"
},
"geometry": {
"type": "Point",
"coordinates": [
112.631559,
-7.972523
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Soebandi"
},
"geometry": {
"type": "Point",
"coordinates": [
113.715023,
-8.1519
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Dr R Koesma Tuban"
},
"geometry": {
"type": "Point",
"coordinates": [
112.046519,
-6.898715
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Dr S Djatikoesoemo"
},
"geometry": {
"type": "Point",
"coordinates": [
111.89963,
-7.159511
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kab. Kediri"
},
"geometry": {
"type": "Point",
"coordinates": [
112.176223,
-7.7598
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Blambangan"
},
"geometry": {
"type": "Point",
"coordinates": [
114.365993,
-8.208348
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Dr Soedono"
},
"geometry": {
"type": "Point",
"coordinates": [
111.524026,
-7.626405
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. Iskak Tulungagung"
},
"geometry": {
"type": "Point",
"coordinates": [
111.918118,
-8.054941
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Sidoarjo"
},
"geometry": {
"type": "Point",
"coordinates": [
112.716355,
-7.465433
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Universitas Airlangga"
},
"geometry": {
"type": "Point",
"coordinates": [
112.786114,
-7.270208
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUP Sanglah Denpasar"
},
"geometry": {
"type": "Point",
"coordinates": [
115.213171,
-8.675742
]
}
},
{
"type": "Feature",
"properties": {
"Name": "BRSU Tabanan Bali"
},
"geometry": {
"type": "Point",
"coordinates": [
115.131966,
-8.538915
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Sanjiwani Gianyar"
},
"geometry": {
"type": "Point",
"coordinates": [
115.32254,
-8.537247
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kab. Buleleng"
},
"geometry": {
"type": "Point",
"coordinates": [
115.092475,
-8.119809
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Raba\/ RSUD BIMA"
},
"geometry": {
"type": "Point",
"coordinates": [
118.761842,
-8.47347
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr R Sudjono Selong"
},
"geometry": {
"type": "Point",
"coordinates": [
116.52836,
-8.650538
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS H. L. Manambai Abdulkadir"
},
"geometry": {
"type": "Point",
"coordinates": [
117.447684,
-8.531522
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD NTB"
},
"geometry": {
"type": "Point",
"coordinates": [
116.131047,
-8.607259
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Prof. Dr. WZ Johanes"
},
"geometry": {
"type": "Point",
"coordinates": [
123.585744,
-10.168254
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr TC Hillers"
},
"geometry": {
"type": "Point",
"coordinates": [
122.204232,
-8.622314
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Komodo Labuan Bajo"
},
"geometry": {
"type": "Point",
"coordinates": [
119.896266,
-8.541262
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. Sudarso"
},
"geometry": {
"type": "Point",
"coordinates": [
109.364687,
-0.061533
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr Abdul Azis Singkawang"
},
"geometry": {
"type": "Point",
"coordinates": [
108.972707,
0.895435
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Ade Mohammad Djoen Sintang"
},
"geometry": {
"type": "Point",
"coordinates": [
111.496019,
0.078503
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. Agoesdjam Ketapang"
},
"geometry": {
"type": "Point",
"coordinates": [
109.967432,
-1.832508
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Doris Sylvanus"
},
"geometry": {
"type": "Point",
"coordinates": [
113.922484,
-2.210517
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr Murjani Sampit"
},
"geometry": {
"type": "Point",
"coordinates": [
112.949049,
-2.542742
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Sultan Imanuddin Pangkalan Bun"
},
"geometry": {
"type": "Point",
"coordinates": [
111.632196,
-2.691596
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Ulin Banjarmasin"
},
"geometry": {
"type": "Point",
"coordinates": [
114.601178,
-3.322823
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD H. Boejasin Pelaihari"
},
"geometry": {
"type": "Point",
"coordinates": [
114.800878,
-3.461202
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Kanujoso Djatiwibowo"
},
"geometry": {
"type": "Point",
"coordinates": [
116.868169,
-1.225476
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU H A Wahab Sjahranie"
},
"geometry": {
"type": "Point",
"coordinates": [
117.144268,
-0.478992
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Panglima Sebaya"
},
"geometry": {
"type": "Point",
"coordinates": [
116.178674,
-1.873455
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Taman Husada Bontang"
},
"geometry": {
"type": "Point",
"coordinates": [
117.447806,
0.142619
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Aji Muhammad Parikesit"
},
"geometry": {
"type": "Point",
"coordinates": [
117.012931,
-0.438961
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Tanjung Selor"
},
"geometry": {
"type": "Point",
"coordinates": [
117.3809,
2.830326
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Kota Tarakan"
},
"geometry": {
"type": "Point",
"coordinates": [
117.605064,
3.318219
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Prof. DR. RD Kandou"
},
"geometry": {
"type": "Point",
"coordinates": [
124.808177,
1.453542
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr Sam Ratulangi"
},
"geometry": {
"type": "Point",
"coordinates": [
124.916563,
1.309592
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Ratatotok - Buyat"
},
"geometry": {
"type": "Point",
"coordinates": [
124.69978,
0.87007
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kota Kotamobagu"
},
"geometry": {
"type": "Point",
"coordinates": [
124.307272,
0.708205
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Prof. Dr. H. Aloei Saboe"
},
"geometry": {
"type": "Point",
"coordinates": [
123.084019,
0.555447
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Provinsi Sulawesi Barat"
},
"geometry": {
"type": "Point",
"coordinates": [
118.862749,
-2.689966
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Undata Palu"
},
"geometry": {
"type": "Point",
"coordinates": [
119.884046,
-0.857813
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Kab. Banggai Luwuk"
},
"geometry": {
"type": "Point",
"coordinates": [
122.822197,
-0.934057
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Mokopido Toli-Toli"
},
"geometry": {
"type": "Point",
"coordinates": [
120.822775,
1.035911
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Kolonedale"
},
"geometry": {
"type": "Point",
"coordinates": [
121.336856,
-1.972367
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Anutapura Palu"
},
"geometry": {
"type": "Point",
"coordinates": [
119.849456,
-0.899878
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. Wahidin Sudirohusodo"
},
"geometry": {
"type": "Point",
"coordinates": [
119.493603,
-5.13499
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Andi Makkasau"
},
"geometry": {
"type": "Point",
"coordinates": [
119.633904,
-4.035198
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Lakipadada Tana Toraja"
},
"geometry": {
"type": "Point",
"coordinates": [
119.867713,
-3.073382
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kab.Sinjai"
},
"geometry": {
"type": "Point",
"coordinates": [
120.24917,
-5.128455
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Labuang Baji"
},
"geometry": {
"type": "Point",
"coordinates": [
119.418249,
-5.162544
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Tk.II Pelamonia"
},
"geometry": {
"type": "Point",
"coordinates": [
119.414865,
-5.138155
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RS Dr. Tadjuddin Chalid, MPH"
},
"geometry": {
"type": "Point",
"coordinates": [
119.516584,
-5.111125
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Kendari (Bahtera Mas)"
},
"geometry": {
"type": "Point",
"coordinates": [
122.533652,
-3.990001
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Dr. M Haulussy Ambon"
},
"geometry": {
"type": "Point",
"coordinates": [
128.165473,
-3.708214
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUP dr J. Leimena"
},
"geometry": {
"type": "Point",
"coordinates": [
128.186535,
-3.661374
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Dr. P. P. Magretti Saumlaki"
},
"geometry": {
"type": "Point",
"coordinates": [
131.308037,
-7.97443
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Chasan Basoeri Ternate"
},
"geometry": {
"type": "Point",
"coordinates": [
127.375777,
0.782095
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Jayapura"
},
"geometry": {
"type": "Point",
"coordinates": [
140.710415,
-2.53495
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Nabire"
},
"geometry": {
"type": "Point",
"coordinates": [
135.529582,
-3.342399
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSU Merauke"
},
"geometry": {
"type": "Point",
"coordinates": [
140.388782,
-8.481756
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Manokwari"
},
"geometry": {
"type": "Point",
"coordinates": [
134.078721,
-0.870857
]
}
},
{
"type": "Feature",
"properties": {
"Name": "RSUD Kab. Sorong"
},
"geometry": {
"type": "Point",
"coordinates": [
131.246821,
-0.869553
]
}
}
]
html, body
margin 0
#panel-map
height 100vh
.marker-cluster
display flex
align-items center
justify-content center
border-radius 50%
line-height 1
font-size 11px
font-weight bold
color #000
background #C4C4C4
box-shadow 0 0 0 5px rgba(255, 255, 255, 0.4)
.leaflet-container a.leaflet-popup-close-button
color black !important
.leaflet-container .leaflet-control-attribution
background rgba(0, 0, 0, 0.5)
color rgba(255, 255, 255, 0.8)
const indonesiaExtent = [
[-10.3599874813, 95.2930261576],
[5.47982086834, 141.03385176]
]
const popup = (feature, layer) => {
layer.bindPopup(`
<b>${feature.properties.Name}</b>
`)
}
const itemMarker = (geoJsonPoint, latlng) =>
L.circleMarker(latlng, {
stroke: false,
fillOpacity: 1,
color: '#C4C4C4',
})
const markerCluster = cluster => {
const total = cluster.getAllChildMarkers()
let iconSize
if (total < 10) {
iconSize = 24
} else if (total < 20) {
iconSize = 32
} else {
iconSize = 40
}
return L.divIcon({
html: total.length,
className: 'marker-cluster',
iconSize: L.point(iconSize, iconSize, true)
})
}
const mapRef = L
.map('panel-map', {
zoom: 5,
maxZoom: 14,
zoomControl: false,
center: [-2.438, 117.949],
maxBounds: indonesiaExtent,
})
.whenReady(e => {
e.target.flyToBounds(indonesiaExtent, {
paddingTopLeft: [0, 0]
})
})
L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png', {
attribution: `Map tiles by Carto, under CC BY 3.0. Data by OpenStreetMap, under ODbL. | Data extracted from <a href="http://siaga.bnpb.go.id/rsrujukancovid19">BNPB Map</a>`,
}).addTo(mapRef)
const geojson = L
.geoJSON(data, {
onEachFeature: popup,
pointToLayer: itemMarker,
})
L.markerClusterGroup({ iconCreateFunction: markerCluster })
.addLayer(geojson)
.addTo(mapRef)
Also see: Tab Triggers