Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Catch an OpenLayer error.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jun 25, 2015
1 parent a25863a commit ce80ce6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/src/plugins/editor.openlayer/class.OLViewer.js
Expand Up @@ -298,9 +298,12 @@ Class.create("OLViewer", AbstractEditor, {
var offset = new OpenLayers.Pixel(0, -size.h);
var icon = new OpenLayers.Icon('plugins/editor.openlayer/services.png',size,offset);
markers.addMarker(new OpenLayers.Marker(projectedCenter,icon));

map.setCenter(projectedCenter, 10);
}
try{
map.setCenter(projectedCenter, 10);
}catch(e){
if(console) console.error(e);
}
}
return {MAP: map, LAYERS:layers};
},

Expand Down

0 comments on commit ce80ce6

Please sign in to comment.