increased zoom level for route description (new config entry),
removed some deprecated comments
This commit is contained in:
parent
fe6d854e11
commit
92dbadebae
@ -58,11 +58,9 @@ getLng: function() {
|
||||
isShown: function() {
|
||||
return this.shown;
|
||||
},
|
||||
centerView: function(zooming) {
|
||||
var zoom = OSRM.DEFAULTS.ZOOM_LEVEL;
|
||||
if( zooming == false )
|
||||
zoom = OSRM.G.map.getZoom();
|
||||
//OSRM.G.map.setView( new L.LatLng( this.position.lat, this.position.lng-0.02), zoom); // dirty hack
|
||||
centerView: function(zoom) {
|
||||
if( zoom == undefined )
|
||||
zoom = OSRM.DEFAULTS.ZOOM_LEVEL;
|
||||
OSRM.G.map.setView( new L.LatLng( this.position.lat, this.position.lng), zoom);
|
||||
},
|
||||
toString: function() {
|
||||
|
@ -30,6 +30,7 @@ OSRM.DEFAULTS = {
|
||||
ONLOAD_LONGITUDE: 10.10,
|
||||
ONLOAD_SOURCE: "",
|
||||
ONLOAD_TARGET: "",
|
||||
HIGHLIGHT_ZOOM_LEVEL: 16,
|
||||
LANGUAGE: "en",
|
||||
GEOCODER_BOUNDS: '&bounded=1&viewbox=-27.0,72.0,46.0,36.0'
|
||||
};
|
||||
|
@ -63,7 +63,7 @@ function callGeocoder(marker_id, query) {
|
||||
|
||||
|
||||
// helper function for clicks on geocoder search results
|
||||
function onclickGeocoderResult(marker_id, lat, lon, do_reverse_geocode, zoom ) {
|
||||
function onclickGeocoderResult(marker_id, lat, lon, do_reverse_geocode, do_zoom ) {
|
||||
var index;
|
||||
if( marker_id == OSRM.C.SOURCE_LABEL )
|
||||
index = OSRM.G.markers.setSource( new L.LatLng(lat, lon) );
|
||||
@ -74,8 +74,9 @@ function onclickGeocoderResult(marker_id, lat, lon, do_reverse_geocode, zoom ) {
|
||||
|
||||
if( do_reverse_geocode == true )
|
||||
updateReverseGeocoder(marker_id);
|
||||
if( zoom == undefined )
|
||||
zoom = true;
|
||||
var zoom = undefined;
|
||||
if( do_zoom == false )
|
||||
zoom = OSRM.G.map.getZoom();
|
||||
|
||||
OSRM.G.markers.route[index].show();
|
||||
if( !OSRM.G.markers.route[index].dirty_move || OSRM.G.markers.route[index].dirty_type )
|
||||
|
@ -93,7 +93,7 @@ function initLocale() {
|
||||
|
||||
// centering on geolocation
|
||||
function callbak_centerOnGeolocation( position ) {
|
||||
OSRM.G.map.setView( new L.LatLng( position.coords.latitude, position.coords.longitude-0.02), OSRM.DEFAULTS.ZOOM_LEVEL);
|
||||
OSRM.G.map.setView( new L.LatLng( position.coords.latitude, position.coords.longitude), OSRM.DEFAULTS.ZOOM_LEVEL);
|
||||
}
|
||||
function centerOnGeolocation() {
|
||||
if (navigator.geolocation)
|
||||
|
@ -122,7 +122,7 @@ function onClickRouteDescription(geometry_index) {
|
||||
|
||||
OSRM.G.markers.highlight.setPosition( positions[geometry_index] );
|
||||
OSRM.G.markers.highlight.show();
|
||||
OSRM.G.markers.highlight.centerView();
|
||||
OSRM.G.markers.highlight.centerView(OSRM.DEFAULTS.HIGHLIGHT_ZOOM_LEVEL);
|
||||
}
|
||||
function onClickCreateShortcut(src){
|
||||
OSRM.JSONP.call(OSRM.DEFAULTS.HOST_SHORTENER_URL+src+'&jsonp=showRouteLink', showRouteLink, showRouteLink_TimeOut, 2000, 'shortener');
|
||||
|
Loading…
Reference in New Issue
Block a user