@@ -10,7 +10,8 @@ var tm_urls = {
10
10
eactive_key : '898cfa06a63e5ad7a427a30896cd95c2' ,
11
11
// now pulled in from settings file...
12
12
//tc_url : 'http://tc2.beardedmaps.com/tilecache.cgi/1.0.0/'
13
- tc_url : 'http://tilecache.urbanforestmap.org/tiles/1.0.0/trees/' ,
13
+ //tc_url : 'http://tilecache.urbanforestmap.org/tiles/1.0.0/trees/',
14
+ tc_url : 'http://sajara01.internal.azavea.com/tilecache/tiles/1.0.0/trees/' ,
14
15
qs_tile_url : '/qs_tiles/1.0.0/foo/' // layername is pulled from request.GET, can remove 'foo' eventually
15
16
} ;
16
17
@@ -85,7 +86,7 @@ var tm = {
85
86
if ( this . value ) {
86
87
tm . handleSearchLocation ( this . value ) ;
87
88
} else {
88
- $ ( "#location_search_input" ) . val ( "San Francisco, CA " ) ;
89
+ $ ( "#location_search_input" ) . val ( "Philadelphia, PA " ) ;
89
90
delete tm . searchParams [ 'location' ] ;
90
91
tm . updateSearch ( ) ;
91
92
@@ -236,7 +237,7 @@ var tm = {
236
237
}
237
238
function triggerSearch ( ) {
238
239
var q = $ . query . empty ( ) ;
239
- if ( $ ( "#location_search_input" ) . val ( ) != "San Francisco, CA " ) {
240
+ if ( $ ( "#location_search_input" ) . val ( ) != "Philadelphia, PA " ) {
240
241
q = q . set ( "location" , $ ( "#location_search_input" ) . val ( ) ) ;
241
242
}
242
243
if ( $ ( "#species_search_id" ) . val ( ) ) {
@@ -278,10 +279,10 @@ var tm = {
278
279
} ,
279
280
setup : function ( ) {
280
281
tm . geocoder = new GClientGeocoder ( ) ;
281
- tm . map . setCenter ( new GLatLng ( 37.76 , - 122.45 ) , 12 ) ;
282
+ tm . map . setCenter ( new GLatLng ( 39.99 , - 75.19 ) , 11 ) ;
282
283
// bounds based on new GLatLng(37.76, -122.45), 10);
283
284
// we should consider making this a user-set database value
284
- tm . maxExtent = new GLatLngBounds ( new GLatLng ( 37.65 , - 122.7 ) , new GLatLng ( 37.85 , - 122.2 ) ) ;
285
+ tm . maxExtent = new GLatLngBounds ( new GLatLng ( 39.75 , - 76 ) , new GLatLng ( 40.5 , - 74.5 ) ) ;
285
286
tm . geocoder . setViewport ( tm . maxExtent ) //bias results for sf
286
287
} ,
287
288
@@ -346,7 +347,7 @@ var tm = {
346
347
jQuery ( '#id_edit_address_street' ) . change ( function ( nearby_field ) {
347
348
//console.log(nearby_field);
348
349
var new_addy = nearby_field . target . value ;
349
- new_addy += ", sf " ;
350
+ // new_addy += ", ph ";
350
351
if ( ! tm . tree_marker && new_addy ) { //only add marker if it doesn't yet exist
351
352
352
353
tm . geocoder . getLatLng ( new_addy , function ( ll ) {
@@ -421,7 +422,7 @@ var tm = {
421
422
jQuery ( '#id_nearby_address' ) . change ( function ( nearby_field ) {
422
423
423
424
var new_addy = nearby_field . target . value ;
424
- new_addy += ', sf ' ;
425
+ // new_addy += ', ph ';
425
426
tm . geocoder . getLatLng ( new_addy , function ( ll ) {
426
427
if ( tm . validate_point ( ll , new_addy ) && ! tm . tree_marker ) { //only add marker if it doesn't yet exist
427
428
tm . add_new_tree_marker ( ll ) ;
@@ -543,12 +544,12 @@ var tm = {
543
544
544
545
this . set_default_map_zoom_levels ( ) ;
545
546
//set map zoom levels
546
- jQuery . each ( tm . map . getMapTypes ( ) , function ( i , mt ) {
547
- mt . getMinimumResolution = function ( ) { return 12 ; }
548
- mt . getMaximumResolution = function ( ) { return 19 ; }
549
- if ( mt . getName ( ) == 'Terrain' ) { mt . getMaximumResolution = function ( ) { return 15 ; } }
550
- //if (mt.getName() == 'Satellite') {tm.map.removeMapType(mt);}
551
- } ) ;
547
+ // jQuery.each(tm.map.getMapTypes(), function(i,mt){
548
+ // mt.getMinimumResolution = function() {return 10 ;}
549
+ // mt.getMaximumResolution = function() {return 19;}
550
+ // if (mt.getName() == 'Terrain') {mt.getMaximumResolution = function() { return 15;}}
551
+ // //if (mt.getName() == 'Satellite') {tm.map.removeMapType(mt);}
552
+ // });
552
553
553
554
//todo replace map layer with custom
554
555
@@ -631,7 +632,7 @@ var tm = {
631
632
set_default_map_zoom_levels : function ( ) {
632
633
//set map zoom levels
633
634
jQuery . each ( tm . map . getMapTypes ( ) , function ( i , mt ) {
634
- mt . getMinimumResolution = function ( ) { return 12 ; }
635
+ mt . getMinimumResolution = function ( ) { return 10 ; }
635
636
mt . getMaximumResolution = function ( ) { return 19 ; }
636
637
if ( mt . getName ( ) == 'Terrain' ) { mt . getMaximumResolution = function ( ) { return 15 ; } }
637
638
//if (mt.getName() == 'Satellite') {tm.map.removeMapType(mt);}
@@ -878,7 +879,7 @@ var tm = {
878
879
//ew.html(addy + ' in ' + geog.name);
879
880
}
880
881
} else {
881
- $ ( '#summary_subset_val' ) . html ( 'San Francisco ' ) ;
882
+ $ ( '#summary_subset_val' ) . html ( 'Philadelphia ' ) ;
882
883
}
883
884
if ( results . tile_query ) {
884
885
tm . selected_tile_query = results . tile_query ;
@@ -966,7 +967,7 @@ var tm = {
966
967
var lat_lon = new GLatLng ( point . lat ( ) , point . lng ( ) , 0 ) ;
967
968
968
969
if ( tm . maxExtent && ! tm . maxExtent . containsLatLng ( lat_lon ) ) {
969
- alert ( "Sorry, '" + address + "' appears not to be within San Francisco " ) ;
970
+ alert ( "Sorry, '" + address + "' appears to be too far away from our supported area. " ) ;
970
971
return false ;
971
972
}
972
973
return true ;
@@ -977,7 +978,7 @@ var tm = {
977
978
address = jQuery ( '#searchInput' ) . text ( ) ;
978
979
}
979
980
tm . geocoder . setViewport ( tm . map . getBounds ( ) ) ;
980
- var address = address + ", sf " ;
981
+ // var address = address + ", ph ";
981
982
tm . geocoder . getLatLng ( address , function ( point ) {
982
983
if ( tm . validate_point ( point , address ) ) {
983
984
if ( tm . location_marker ) { tm . map . removeOverlay ( tm . location_marker ) }
@@ -1545,7 +1546,19 @@ var tm = {
1545
1546
updateSpeciesFromKey : function ( tree_code , tree_cultivar ) {
1546
1547
alert ( tree_code ) ;
1547
1548
} ,
1548
-
1549
+
1550
+ updateReputation : function ( change_type , change_id , rep_dir ) {
1551
+ $ . ajax ( {
1552
+ url : '/verify/' + change_type + '/' + change_id + '/' + rep_dir ,
1553
+ dataType : 'json' ,
1554
+ success : function ( response ) {
1555
+ $ ( "#" + response . change_type + "_" + response . change_id ) . fadeOut ( ) ;
1556
+ } ,
1557
+ error : function ( err ) {
1558
+ alert ( "Error: " + err . status + "\nQuery: " + change_type + " " + change_id + " " + rep_dir ) ;
1559
+ }
1560
+ } ) ;
1561
+ } ,
1549
1562
1550
1563
}
1551
1564
$ . editable . addInputType ( "autocomplete_species" , {
0 commit comments