Reputation: 271
For Some reason none of the markers are apearing on the webpage but the map renders just fine. I would appreciate some help in finding out what is my error.
index.html
<div id="mapid"></div>
<style>
#mapid {
height: 750px;
}
</style>
app.js
function controller($scope, $state) {
var map = L.map('mapid', {
worldCopyJump: true,
}).setView([51.505, -0.09], 13);
var rmLight = L.tileLayer('http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}', {
maxZoom: 20,
subdomains: ['mt0', 'mt1', 'mt2', 'mt3']
}).addTo(map);
var marker = L.marker([51.5, -0.09]).addTo(map);
}
Upvotes: 1
Views: 132
Reputation: 1028
Your code looks good per the plunker in the comment.
Also check the source to see if the element is there and just not showing up due to a css or image problem.
Upvotes: 1