Draw country border on leaflet map using JSON coordinatesHow to map JSON data graphically on a Leaflet map?leaflet map shows up greyShips movement on a leaflet mapAdd border layer to offline map using leafletleaflet and xy coordinatesDrawing rectangle on leaflet by giving coordinateLeaflet - get data from static file and API call to build a choropleth mapDestination coordinates in leaflet routingDraw a map of a specific country with leafletDraw a map of a specific country with leaflet in djangoHow to programmatically draw on an OSM map with leaflet

How can I support myself financially as a 17 year old with a loan?

Missing Piece of Pie - Can you find it?

Will 700 more planes a day fly because of the Heathrow expansion?

Why do money exchangers give different rates to different bills?

How can I get a job without pushing my family's income into a higher tax bracket?

How does this change to the opportunity attack rule impact combat?

Pressure inside an infinite ocean?

Pronunciation of numbers with respect to years

Why isn't nylon as strong as kevlar?

How I can I roll a number of non-digital dice to get a random number between 1 and 150?

Shantae Dance Matching

What is a smasher?

How do I overfit?

Has a commercial or military jet bi-plane ever been manufactured?

Should I replace my bicycle tires if they have not been inflated in multiple years

Would Hubble Space Telescope improve black hole image observed by EHT if it joined array of telesopes?

Finding positions of minimum values in list

Why was the battle set up *outside* Winterfell?

How did Shepard's and Grissom's speeds compare with orbital velocity?

Point of the the Dothraki's attack in GoT S8E3?

Prove that the limit exists or does not exist

Is there an idiom that support the idea that "inflation is bad"?

Should I mention being denied entry to UK due to a confusion in my Visa and Ticket bookings?

Using a microphone from the 1930s



Draw country border on leaflet map using JSON coordinates


How to map JSON data graphically on a Leaflet map?leaflet map shows up greyShips movement on a leaflet mapAdd border layer to offline map using leafletleaflet and xy coordinatesDrawing rectangle on leaflet by giving coordinateLeaflet - get data from static file and API call to build a choropleth mapDestination coordinates in leaflet routingDraw a map of a specific country with leafletDraw a map of a specific country with leaflet in djangoHow to programmatically draw on an OSM map with leaflet






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I have a leaflet map, and I have a set of country borders in a long JSON file. I am trying to use the JSON coordinates to draw a solid green border along the border of a country displayed in the map object.



I do not want to draw a fully covered layer over the country either.



I have built a JS function that makes an Ajax call to request JSON border coordinates for a specific country.



When the JSON data is received, I apply and bound it to the map object.



function applyCountryBorder(countryname) 
var addresssObj = null;

jQuery.ajax(
type: 'GET',
dataType: 'json',
url: 'https://nominatim.openstreetmap.org/search?country=' + countryname.trim() + '&polygon_geojson=1&format=json',
async: true,
cache: true,
success: function(responseData)
var polyline = L.polyline(responseData[0].geojson.coordinates,
color: 'green',
weight: 14,
opacity: 1
).addTo(map);
map.invalidateSize();
,
error: function(responseData)
addresssObj = responseData;
);



I expect the border of the specified country to have a bright, solid, thick, green line. But actually, the map and country borders remain unchanged and remain default.



What am I doing wrong? How can I achieve the desired goal?










share|improve this question
























  • Maybe this answer can help out

    – N8888
    Mar 22 at 22:37

















0















I have a leaflet map, and I have a set of country borders in a long JSON file. I am trying to use the JSON coordinates to draw a solid green border along the border of a country displayed in the map object.



I do not want to draw a fully covered layer over the country either.



I have built a JS function that makes an Ajax call to request JSON border coordinates for a specific country.



When the JSON data is received, I apply and bound it to the map object.



function applyCountryBorder(countryname) 
var addresssObj = null;

jQuery.ajax(
type: 'GET',
dataType: 'json',
url: 'https://nominatim.openstreetmap.org/search?country=' + countryname.trim() + '&polygon_geojson=1&format=json',
async: true,
cache: true,
success: function(responseData)
var polyline = L.polyline(responseData[0].geojson.coordinates,
color: 'green',
weight: 14,
opacity: 1
).addTo(map);
map.invalidateSize();
,
error: function(responseData)
addresssObj = responseData;
);



I expect the border of the specified country to have a bright, solid, thick, green line. But actually, the map and country borders remain unchanged and remain default.



What am I doing wrong? How can I achieve the desired goal?










share|improve this question
























  • Maybe this answer can help out

    – N8888
    Mar 22 at 22:37













0












0








0








I have a leaflet map, and I have a set of country borders in a long JSON file. I am trying to use the JSON coordinates to draw a solid green border along the border of a country displayed in the map object.



I do not want to draw a fully covered layer over the country either.



I have built a JS function that makes an Ajax call to request JSON border coordinates for a specific country.



When the JSON data is received, I apply and bound it to the map object.



function applyCountryBorder(countryname) 
var addresssObj = null;

jQuery.ajax(
type: 'GET',
dataType: 'json',
url: 'https://nominatim.openstreetmap.org/search?country=' + countryname.trim() + '&polygon_geojson=1&format=json',
async: true,
cache: true,
success: function(responseData)
var polyline = L.polyline(responseData[0].geojson.coordinates,
color: 'green',
weight: 14,
opacity: 1
).addTo(map);
map.invalidateSize();
,
error: function(responseData)
addresssObj = responseData;
);



I expect the border of the specified country to have a bright, solid, thick, green line. But actually, the map and country borders remain unchanged and remain default.



What am I doing wrong? How can I achieve the desired goal?










share|improve this question
















I have a leaflet map, and I have a set of country borders in a long JSON file. I am trying to use the JSON coordinates to draw a solid green border along the border of a country displayed in the map object.



I do not want to draw a fully covered layer over the country either.



I have built a JS function that makes an Ajax call to request JSON border coordinates for a specific country.



When the JSON data is received, I apply and bound it to the map object.



function applyCountryBorder(countryname) 
var addresssObj = null;

jQuery.ajax(
type: 'GET',
dataType: 'json',
url: 'https://nominatim.openstreetmap.org/search?country=' + countryname.trim() + '&polygon_geojson=1&format=json',
async: true,
cache: true,
success: function(responseData)
var polyline = L.polyline(responseData[0].geojson.coordinates,
color: 'green',
weight: 14,
opacity: 1
).addTo(map);
map.invalidateSize();
,
error: function(responseData)
addresssObj = responseData;
);



I expect the border of the specified country to have a bright, solid, thick, green line. But actually, the map and country borders remain unchanged and remain default.



What am I doing wrong? How can I achieve the desired goal?







javascript json leaflet polygon openstreetmap






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 25 at 4:04







Morgan Janjua Crane

















asked Mar 22 at 22:33









Morgan Janjua CraneMorgan Janjua Crane

84




84












  • Maybe this answer can help out

    – N8888
    Mar 22 at 22:37

















  • Maybe this answer can help out

    – N8888
    Mar 22 at 22:37
















Maybe this answer can help out

– N8888
Mar 22 at 22:37





Maybe this answer can help out

– N8888
Mar 22 at 22:37












1 Answer
1






active

oldest

votes


















1














Most likely border (MultiPolygon shape) is getting rendered but just not on the place you expect it to. In GeoJSON format coordinates are represented in lng,lat order while L.polyline expects the coordinates in format lat,lng, in another words GeoJSON coordinates (lng,lat) needs to swapped to lat,lng.



L.GeoJSON.coordsToLatLng() function could be utilized for that matter, for example



const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2); 
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);



Since a provided service returns GeoJSON, another option would be to utilize L.geoJSON to render a border like this:






const layer = L.tileLayer("http://s.tile.openstreetmap.org/z/x/y.png", 
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
);

const map = L.map("map",
layers: [layer]
).setView([52.8203934, -4.5700609], 6);
applyCountryBorder(map, "United Kingdom");

function applyCountryBorder(map, countryname)
jQuery
.ajax(
type: "GET",
dataType: "json",
url:
"https://nominatim.openstreetmap.org/search?country=" +
countryname.trim() +
"&polygon_geojson=1&format=json"
)
.then(function(data)
/*const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2)
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);*/

L.geoJSON(data[0].geojson,
color: "green",
weight: 14,
opacity: 1,
fillOpacity: 0.0
).addTo(map);
);

#map 
width: 100%;
height: 480px;

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<div id="map"></div>








share|improve this answer




















  • 1





    Brilliant. Thank you, just what i was missing.

    – Morgan Janjua Crane
    Mar 28 at 0:30











  • How do I get just the border and no color fill inside? Apparently this draws the border as well as fills layer with a color too. Is it possible to have transparent fill , but solid border only?

    – Morgan Janjua Crane
    Mar 28 at 0:39











  • @MorganJanjuaCrane, i guess you are after fillOpacity: 0.0 property, the example has been updated

    – Vadim Gremyachev
    Mar 28 at 8:47











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55308638%2fdraw-country-border-on-leaflet-map-using-json-coordinates%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Most likely border (MultiPolygon shape) is getting rendered but just not on the place you expect it to. In GeoJSON format coordinates are represented in lng,lat order while L.polyline expects the coordinates in format lat,lng, in another words GeoJSON coordinates (lng,lat) needs to swapped to lat,lng.



L.GeoJSON.coordsToLatLng() function could be utilized for that matter, for example



const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2); 
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);



Since a provided service returns GeoJSON, another option would be to utilize L.geoJSON to render a border like this:






const layer = L.tileLayer("http://s.tile.openstreetmap.org/z/x/y.png", 
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
);

const map = L.map("map",
layers: [layer]
).setView([52.8203934, -4.5700609], 6);
applyCountryBorder(map, "United Kingdom");

function applyCountryBorder(map, countryname)
jQuery
.ajax(
type: "GET",
dataType: "json",
url:
"https://nominatim.openstreetmap.org/search?country=" +
countryname.trim() +
"&polygon_geojson=1&format=json"
)
.then(function(data)
/*const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2)
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);*/

L.geoJSON(data[0].geojson,
color: "green",
weight: 14,
opacity: 1,
fillOpacity: 0.0
).addTo(map);
);

#map 
width: 100%;
height: 480px;

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<div id="map"></div>








share|improve this answer




















  • 1





    Brilliant. Thank you, just what i was missing.

    – Morgan Janjua Crane
    Mar 28 at 0:30











  • How do I get just the border and no color fill inside? Apparently this draws the border as well as fills layer with a color too. Is it possible to have transparent fill , but solid border only?

    – Morgan Janjua Crane
    Mar 28 at 0:39











  • @MorganJanjuaCrane, i guess you are after fillOpacity: 0.0 property, the example has been updated

    – Vadim Gremyachev
    Mar 28 at 8:47















1














Most likely border (MultiPolygon shape) is getting rendered but just not on the place you expect it to. In GeoJSON format coordinates are represented in lng,lat order while L.polyline expects the coordinates in format lat,lng, in another words GeoJSON coordinates (lng,lat) needs to swapped to lat,lng.



L.GeoJSON.coordsToLatLng() function could be utilized for that matter, for example



const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2); 
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);



Since a provided service returns GeoJSON, another option would be to utilize L.geoJSON to render a border like this:






const layer = L.tileLayer("http://s.tile.openstreetmap.org/z/x/y.png", 
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
);

const map = L.map("map",
layers: [layer]
).setView([52.8203934, -4.5700609], 6);
applyCountryBorder(map, "United Kingdom");

function applyCountryBorder(map, countryname)
jQuery
.ajax(
type: "GET",
dataType: "json",
url:
"https://nominatim.openstreetmap.org/search?country=" +
countryname.trim() +
"&polygon_geojson=1&format=json"
)
.then(function(data)
/*const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2)
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);*/

L.geoJSON(data[0].geojson,
color: "green",
weight: 14,
opacity: 1,
fillOpacity: 0.0
).addTo(map);
);

#map 
width: 100%;
height: 480px;

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<div id="map"></div>








share|improve this answer




















  • 1





    Brilliant. Thank you, just what i was missing.

    – Morgan Janjua Crane
    Mar 28 at 0:30











  • How do I get just the border and no color fill inside? Apparently this draws the border as well as fills layer with a color too. Is it possible to have transparent fill , but solid border only?

    – Morgan Janjua Crane
    Mar 28 at 0:39











  • @MorganJanjuaCrane, i guess you are after fillOpacity: 0.0 property, the example has been updated

    – Vadim Gremyachev
    Mar 28 at 8:47













1












1








1







Most likely border (MultiPolygon shape) is getting rendered but just not on the place you expect it to. In GeoJSON format coordinates are represented in lng,lat order while L.polyline expects the coordinates in format lat,lng, in another words GeoJSON coordinates (lng,lat) needs to swapped to lat,lng.



L.GeoJSON.coordsToLatLng() function could be utilized for that matter, for example



const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2); 
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);



Since a provided service returns GeoJSON, another option would be to utilize L.geoJSON to render a border like this:






const layer = L.tileLayer("http://s.tile.openstreetmap.org/z/x/y.png", 
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
);

const map = L.map("map",
layers: [layer]
).setView([52.8203934, -4.5700609], 6);
applyCountryBorder(map, "United Kingdom");

function applyCountryBorder(map, countryname)
jQuery
.ajax(
type: "GET",
dataType: "json",
url:
"https://nominatim.openstreetmap.org/search?country=" +
countryname.trim() +
"&polygon_geojson=1&format=json"
)
.then(function(data)
/*const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2)
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);*/

L.geoJSON(data[0].geojson,
color: "green",
weight: 14,
opacity: 1,
fillOpacity: 0.0
).addTo(map);
);

#map 
width: 100%;
height: 480px;

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<div id="map"></div>








share|improve this answer















Most likely border (MultiPolygon shape) is getting rendered but just not on the place you expect it to. In GeoJSON format coordinates are represented in lng,lat order while L.polyline expects the coordinates in format lat,lng, in another words GeoJSON coordinates (lng,lat) needs to swapped to lat,lng.



L.GeoJSON.coordsToLatLng() function could be utilized for that matter, for example



const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2); 
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);



Since a provided service returns GeoJSON, another option would be to utilize L.geoJSON to render a border like this:






const layer = L.tileLayer("http://s.tile.openstreetmap.org/z/x/y.png", 
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
);

const map = L.map("map",
layers: [layer]
).setView([52.8203934, -4.5700609], 6);
applyCountryBorder(map, "United Kingdom");

function applyCountryBorder(map, countryname)
jQuery
.ajax(
type: "GET",
dataType: "json",
url:
"https://nominatim.openstreetmap.org/search?country=" +
countryname.trim() +
"&polygon_geojson=1&format=json"
)
.then(function(data)
/*const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2)
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);*/

L.geoJSON(data[0].geojson,
color: "green",
weight: 14,
opacity: 1,
fillOpacity: 0.0
).addTo(map);
);

#map 
width: 100%;
height: 480px;

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<div id="map"></div>








const layer = L.tileLayer("http://s.tile.openstreetmap.org/z/x/y.png", 
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
);

const map = L.map("map",
layers: [layer]
).setView([52.8203934, -4.5700609], 6);
applyCountryBorder(map, "United Kingdom");

function applyCountryBorder(map, countryname)
jQuery
.ajax(
type: "GET",
dataType: "json",
url:
"https://nominatim.openstreetmap.org/search?country=" +
countryname.trim() +
"&polygon_geojson=1&format=json"
)
.then(function(data)
/*const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2)
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);*/

L.geoJSON(data[0].geojson,
color: "green",
weight: 14,
opacity: 1,
fillOpacity: 0.0
).addTo(map);
);

#map 
width: 100%;
height: 480px;

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<div id="map"></div>





const layer = L.tileLayer("http://s.tile.openstreetmap.org/z/x/y.png", 
maxZoom: 19,
attribution:
'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
);

const map = L.map("map",
layers: [layer]
).setView([52.8203934, -4.5700609], 6);
applyCountryBorder(map, "United Kingdom");

function applyCountryBorder(map, countryname)
jQuery
.ajax(
type: "GET",
dataType: "json",
url:
"https://nominatim.openstreetmap.org/search?country=" +
countryname.trim() +
"&polygon_geojson=1&format=json"
)
.then(function(data)
/*const latLngs = L.GeoJSON.coordsToLatLngs(data[0].geojson.coordinates,2)
L.polyline(latLngs,
color: "green",
weight: 14,
opacity: 1
).addTo(map);*/

L.geoJSON(data[0].geojson,
color: "green",
weight: 14,
opacity: 1,
fillOpacity: 0.0
).addTo(map);
);

#map 
width: 100%;
height: 480px;

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
<link
rel="stylesheet"
href="https://unpkg.com/leaflet@1.4.0/dist/leaflet.css"
/>
<script src="https://unpkg.com/leaflet@1.4.0/dist/leaflet.js"></script>
<div id="map"></div>






share|improve this answer














share|improve this answer



share|improve this answer








edited Mar 28 at 8:46

























answered Mar 26 at 21:32









Vadim GremyachevVadim Gremyachev

38.3k774116




38.3k774116







  • 1





    Brilliant. Thank you, just what i was missing.

    – Morgan Janjua Crane
    Mar 28 at 0:30











  • How do I get just the border and no color fill inside? Apparently this draws the border as well as fills layer with a color too. Is it possible to have transparent fill , but solid border only?

    – Morgan Janjua Crane
    Mar 28 at 0:39











  • @MorganJanjuaCrane, i guess you are after fillOpacity: 0.0 property, the example has been updated

    – Vadim Gremyachev
    Mar 28 at 8:47












  • 1





    Brilliant. Thank you, just what i was missing.

    – Morgan Janjua Crane
    Mar 28 at 0:30











  • How do I get just the border and no color fill inside? Apparently this draws the border as well as fills layer with a color too. Is it possible to have transparent fill , but solid border only?

    – Morgan Janjua Crane
    Mar 28 at 0:39











  • @MorganJanjuaCrane, i guess you are after fillOpacity: 0.0 property, the example has been updated

    – Vadim Gremyachev
    Mar 28 at 8:47







1




1





Brilliant. Thank you, just what i was missing.

– Morgan Janjua Crane
Mar 28 at 0:30





Brilliant. Thank you, just what i was missing.

– Morgan Janjua Crane
Mar 28 at 0:30













How do I get just the border and no color fill inside? Apparently this draws the border as well as fills layer with a color too. Is it possible to have transparent fill , but solid border only?

– Morgan Janjua Crane
Mar 28 at 0:39





How do I get just the border and no color fill inside? Apparently this draws the border as well as fills layer with a color too. Is it possible to have transparent fill , but solid border only?

– Morgan Janjua Crane
Mar 28 at 0:39













@MorganJanjuaCrane, i guess you are after fillOpacity: 0.0 property, the example has been updated

– Vadim Gremyachev
Mar 28 at 8:47





@MorganJanjuaCrane, i guess you are after fillOpacity: 0.0 property, the example has been updated

– Vadim Gremyachev
Mar 28 at 8:47



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55308638%2fdraw-country-border-on-leaflet-map-using-json-coordinates%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript