Skip to content

Commit

Permalink
900, not 200.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom MacWright committed Aug 10, 2010
1 parent 65e7cf4 commit 4b1b582
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions mapsonastick/static/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,22 +155,18 @@ function add_kml(layer_title, layer_url, layer_filename) {
visibility: false
}
);
if (layer_filename !== null && args.added_file === layer_filename) {
l.setVisibility(true);
}
l.setVisibility(layer_filename !== null && args.added_file === layer_filename);
l.events.on({
'loadend': function() {
if (this.features.length > 0) {

if (this.features.length > 900 && // 900 is an arbitary number
!moas_confirm('', 'This KML file (' + layer_filename + ') contains over ' +
'two hundred points. It may cause your browser to operate slowly. Are you ' +
'nine hundred points. It may cause your browser to operate slowly. Are you ' +
'sure you want to load this layer?')) {
this.map.removeLayer(this);
}

try {
kml_title = $(this.protocol.format.data).find('kml > Document > name').text();
var kml_title = $(this.protocol.format.data).find('kml > Document > name').text();
if (kml_title !== "") {
this.title = kml_title;
OpenLayersPlusBlockswitcher.styleChanged = true;
Expand Down Expand Up @@ -262,10 +258,7 @@ $(window).load(
* @TODO: these should be moved outside this function
*/
var options, selectControl;
/**
* set options so that KML markers with lat/lon points can
* be placed on map tiles that are in spherical mercator
*/

options = {
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
Expand Down

0 comments on commit 4b1b582

Please sign in to comment.