Skip to content

Commit

Permalink
Ajout des markers sur la map de test #37
Browse files Browse the repository at this point in the history
  • Loading branch information
oceanBigOne authored and ColinMaudry committed Mar 31, 2017
1 parent 0c692b7 commit 7339dad
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions templates/visitor/candidature/map.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@
var zoom=8;
var markers = new OpenLayers.Layer.Markers( "Markers" );
map.addLayer(markers);
{% for candidature in candidatures %}
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat( {{ candidature.lng }} ,{{ candidature.lat }} )));
markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat( {{ candidature.lng }} ,{{ candidature.lat }} ).transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
map.getProjectionObject())) // to Spherical Mercator Projection
);
{% endfor %}
map.addLayer(markers);
map.setCenter (center, zoom);
</script>

</body></html>

0 comments on commit 7339dad

Please sign in to comment.