Adding dynamic markers on to mapbox map file.
I am looking for a way to add markers on to a map which I have created in
a web page... Here is the code for the page...
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css'
rel='stylesheet' />
<script src='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script>
<style>
#map {
width: 100%;
height: 600px;
}
</style>
<div id='map' />
<script type='text/javascript'>
var map = L.mapbox.map('map', '[mapname]')
</script>
This renders the map from mapbox - but I cannot figure out how to write a
web service to provide the markers. This data is stored in a table in a
SQL database.
I understand that I can load a GeoJSON file with the data in - but I am
unsure on how to create this file - and how it differs from regular JSON -
any help would be grateful!
Thanks
No comments:
Post a Comment