I am trying to create a circle marker on a location. It should be showing up on the map. But I cannot seem to find out why it isn't showing up. It seems like the .addTo() is not working.
function addr_search()
{
var addr = "1100 Boulevard Robert-Bourassa #104, Montreal, Quebec H3B 3A5"
var xmlhttp = new XMLHttpRequest();
var url = "https://nominatim.openstreetmap.org/search?format=json&limit=3&q=" + addr;
xmlhttp.onreadystatechange = function()
{
if (this.readyState == 4 && this.status == 200)
{
var myArr = JSON.parse(this.responseText);
doc.lattitude.value=myArr[0].lat;
doc.lattitude.value=myArr[0].lon;
var temp = L.latLng(ConcordiaLat, ConcordiaLong);
L.circleMarker(temp, { color: "green"}).addTo(mymap);
L.circle(temp,{color:"blue",radius:1000}).addTo(mymap);
}
};
xmlhttp.open("GET", url, true);
xmlhttp.send();
}
</script>
<form id="myForm">
<label> <p>Search Address</label>
<p>
<input type="text" id="address" placeholder="Enter address"/>
<button onclick="addr_search()" type="submit" id="button">Submit</button>
<label><p>Lattitude         Longitude<br></label>
<input type="text" id="lat" placeholder="12.345"/>
<input type="text" id="long" placeholder="12.345"/>
<p id="distance"></p>
</form>