[OpenLayers-Users] Not image in IE

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Thu Jun 26 03:13:16 EDT 2008


How much of the code runs?
Have you tried inserting "alert("1");" statements around the code to see 
if it actually executes?

Regards, Kenneth Skovhede, GEOGRAF A/S



David Martinez Morata skrev:
> Thanks for the answers for my question, but now...
>
> I don't have a error message in IE, but I don't have the image too!!!
>
> This is my script:
>
>     <script type="text/javascript">
>
>         // make map available for easy debugging
>         var map;
>
>         // avoid pink tiles
>         OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
>         //OpenLayers.Util.onImageLoadErrorColor = "transparent";
>
>
>         function init(){
>             var options = {numZoomLevels: 20,
>                projection: new OpenLayers.Projection("EPSG:900913"),
>                displayProjection: new OpenLayers.Projection("EPSG:4326")};
>                //units: "m",
>                //maxResolution: 156543.0339,
>                //maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
>                //                                 20037508, 20037508.34),
>             //};
>               // Create a map Object
>             map = new OpenLayers.Map('map', options);
>
>             // Create Google Mercator layers
>             var gmap = new OpenLayers.Layer.Google(
>                 "Google Streets");
>             var gsat = new OpenLayers.Layer.Google(
>                 "Google Satellite",
>                 {type: G_SATELLITE_MAP});
>             var ghyb = new OpenLayers.Layer.Google(
>                 "Google Hybrid",
>                 {type: G_HYBRID_MAP});
>             var gphy = new OpenLayers.Layer.Google(
>                 "Google Physical",
>                 {type: 
> G_PHYSICAL_MAP});                                     
>
> //                Create a WFS Sites Layer
>                     var sites = new OpenLayers.Layer.WFS( "Sites",
>                
> "http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map",
>                {typename: "Sites",maxfeatures: 100 },{
>                featureClass: OpenLayers.Feature.WFS });
> //                    Create a WFS Cables Layer
>                     var cables = new OpenLayers.Layer.WFS( "Cables",
>                
> "http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map",
>                {typename: "Cables", maxfeatures: 100});//,{
>                //featureClass: OpenLayers.Feature.Vector});
>
>             map.addLayers([gsat, gmap,  ghyb, gphy, sites, cables]);
>             map.addControl(new OpenLayers.Control.LayerSwitcher());
>             map.addControl(new OpenLayers.Control.ScaleLine);
>             map.addControl(new OpenLayers.Control.MousePosition());
>            if (!map.getCenter()) {map.zoomToMaxExtent()}
>         }
>
>     function changezoom(x,y,z)
>     {
>     map.setCenter(new OpenLayers.LonLat(x, y), z);
>     }   
>     function showAddress(address) {
>        var geocoder = new GClientGeocoder();
>      if (geocoder) {
>        geocoder.getLatLng(
>          address,
>          function(point) {
>            if (!point) {alert(address + " not found");}
>            else {map.setCenter(new 
> OpenLayers.LonLat(point.x,point.y),15);}
>          }
>        );
>         }
>     }
>
> Thanks for help me!
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080626/a6aa9968/attachment.html


More information about the Users mailing list