<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FR" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi, <o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I’m writting because I have some trouble with a geoJSON file and a leaflet.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I’m trying to display polygon on a leaflet map, but nothing append
</span><span lang="EN-US" style="font-family:"Segoe UI Emoji",sans-serif">☹</span><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I have no error message.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Do you have some advice/ideas?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Here is my code :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">library(leaflet)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">library(jsonlite)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">url <- "http://www.georisques.gouv.fr/api/v1/sis?rayon=1000&latlon=4.854899%2C%2045.763079&page=1&page_size=10"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">geojson <- jsonlite::fromJSON(url)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">leaflet() %>% <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> addTiles()%>%<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> setView(lng = 4.854899, lat = 45.763079, zoom = 14) %>%<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> addMarkers(lng = 4.872536, lat = 45.758321)%>%<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> addGeoJSON(geojson) # doesn’t work by using geojson$data or geojson$data$geom<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="174" style="width:130.7pt;border-collapse:collapse">
<tbody>
<tr>
<td width="174" colspan="2" valign="top" style="width:130.7pt;padding:0cm 5.4pt 0cm 5.4pt">
<p class="MsoNormal"><b><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#003B6A;mso-fareast-language:FR">Benjamin PAUGET<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:#003B6A;mso-fareast-language:FR">Responsable R&D<o:p></o:p></span></p>
</td>
</tr>
<tr style="height:1.65pt">
<td width="174" colspan="2" valign="bottom" style="width:130.7pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.65pt">
<p class="MsoNormal"><span style="mso-fareast-language:FR"><img width="160" height="45" style="width:1.6666in;height:.4687in" id="Image_x0020_17" src="cid:image001.png@01D5365D.13C0F990" alt="cid:image005.png@01D4F3BB.3531D840"></span><span style="mso-fareast-language:FR"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:2.85pt">
<td width="127" valign="top" style="width:95.3pt;padding:0cm 5.4pt 0cm 5.4pt;height:2.85pt">
<p class="MsoNormal"><span style="font-size:2.0pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR">+33 (0)1 81 94 13 70<o:p></o:p></span></p>
</td>
<td width="47" rowspan="2" valign="bottom" style="width:35.4pt;padding:0cm 5.4pt 0cm 5.4pt;height:2.85pt">
</td>
</tr>
<tr style="height:1.4pt">
<td width="127" valign="top" style="width:95.3pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.4pt">
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR">+33 (0)6 47 01 85 92</span><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:1.4pt">
<td width="127" valign="top" style="width:95.3pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.4pt">
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR">Le Visium<o:p></o:p></span></p>
</td>
<td width="47" rowspan="2" valign="bottom" style="width:35.4pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.4pt">
</td>
</tr>
<tr style="height:1.4pt">
<td width="127" valign="top" style="width:95.3pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.4pt">
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR">22 Av Aristide Briand</span><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR"><o:p></o:p></span></p>
</td>
</tr>
<tr style="height:1.4pt">
<td width="127" valign="top" style="width:95.3pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.4pt">
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR">94110 ARCUEIL<o:p></o:p></span></p>
</td>
<td width="47" rowspan="2" valign="bottom" style="width:35.4pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.4pt">
</td>
</tr>
<tr style="height:1.4pt">
<td width="127" valign="top" style="width:95.3pt;padding:0cm 5.4pt 0cm 5.4pt;height:1.4pt">
<p class="MsoNormal"><span style="font-size:8.5pt;mso-fareast-language:FR"><a href="https://tesora.fr/"><span style="font-family:"Tahoma",sans-serif;color:blue">https://tesora.fr/</span></a></span><span style="font-size:8.5pt;mso-fareast-language:FR"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:"Tahoma",sans-serif;mso-fareast-language:FR"><a href="https://www.linkedin.com/company/tesora-france"><span style="color:blue">Linkedin</span></a><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="mso-fareast-language:FR"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>