Click here to Skip to main content
15,893,487 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I want to show a transit layer of a city in my app. But it doesn't show when Im running it

What I have tried:

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">


Transit


All your public transport routes in on one map.


WOW! Making your life a little easier





<script src="http://maps.googleapis.com/maps/api/js?key=myapi"></script>

<script type="text/javascript">
function initialize() {
var mapProp = {
center: new google.maps.LatLng(19.433333, -99.133333),
zoom: 13,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), mapProp);

var transitLayer = new google.maps.TransitLayer();
transitLayer.setMap(map);

}
google.maps.event.addDomListener(window, 'load', initialize);
</script>

Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900