[OSM-newbies] openstreetmap and internet explorer

Gilles Pelletier pellgill at gmail.com
Fri Aug 24 11:28:29 BST 2012


Here is the code I am using:

<script src="http://www.openlayers.org/api/OpenLayers.js"></script>
<script>
   function init() {
     map = new OpenLayers.Map("TaxiBusMap");
     var mapnik         = new OpenLayers.Layer.OSM();
     var fromProjection = new OpenLayers.Projection("EPSG:4326");   //
Transform from WGS 1984
     var toProjection   = new OpenLayers.Projection("EPSG:900913"); // to
Spherical Mercator Projection
     var position       = new
OpenLayers.LonLat(-71.3002,46.0912).transform( fromProjection,
toProjection);
     var zoom           = 16;

     map.addLayer(mapnik);
     map.setCenter(position, zoom );
     var pois = new OpenLayers.Layer.Text( "My Points",
                 { location:"./taxiBusFile.txt",
                   projection: map.displayProjection
                 });
    map.addLayer(pois);
    }
</script>

</head>
<body onload="init();">

<div id="TaxiBusMap" style="height:250px;width:509px"></div>


2012/8/23 David Fawcett <david.fawcett at gmail.com>

> What js mapping library are you using?
>
>   You might want to look at Leaflet and/or OpenLayers.
>
>
>
> On Aug 23, 2012, at 6:30 PM, Gilles Pelletier <pellgill at gmail.com> wrote:
>
> > I succeded in imbeding openstreetmap into a web page and placing a point
> of interest. Works great in firefox. The problem is as usual with internet
> explorer. I get a white empty square where the map should be. Any ideas?
> > _______________________________________________
> > newbies mailing list
> > newbies at openstreetmap.org
> > http://lists.openstreetmap.org/listinfo/newbies
>
> _______________________________________________
> newbies mailing list
> newbies at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/newbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/newbies/attachments/20120824/445cd19b/attachment.html>


More information about the newbies mailing list