Skip to content

Initial extent problem #556

@seandturcott

Description

@seandturcott

Hi, I'm having a problem with setting the initial map extent where the page loads then immediately defaults to a scale (1:282). I have set the bounding box and other extent parameters and the coordinates are valid but they are all ignored or bypassed somehow. Here's my config.json and themes.json. Thanks for any help, Sean:

{"themeId": "tc10000010__zs4", "skipThemeChooser": true, "searchServiceUrl": "http://localhost:8088/api/v2/search/", "searchDataServiceUrl": "http://localhost:8088/api/v2/search/geom/", "editServiceUrl": "http://localhost:8088/api/v1/data/", "mapInfoService": "http://localhost:8088/api/v1/mapinfo/", "permalinkServiceUrl": "", "elevationServiceUrl": "http://localhost:8088/elevation/", "featureReportService": "http://localhost:8088/api/v1/document/", "authServiceUrl": "http://localhost:8088/api/v1/auth/", "routingServiceUrl": "https://valhalla1.openstreetmap.de", "user_infos": {"default_url_params": ""}, "urlPositionFormat": "centerAndZoom", "urlPositionCrs": "EPSG:3857", "loadTranslationOverrides": false, "omitUrlParameterUpdates": true, "preserveExtentOnThemeSwitch": false, "preserveBackgroundOnThemeSwitch": true, "preserveNonThemeLayersOnThemeSwitch": false, "storeAllLayersInPermalink": false, "allowReorderingLayers": true, "preventSplittingGroupsWhenReordering": false, "allowLayerTreeSeparators": false, "flattenLayerTreeGroups": false, "allowRemovingThemeLayers": true, "globallyDisableDockableDialogs": false, "globallyDisableMaximizeableDialogs": false, "searchThemes": true, "searchThemeLayers": true, "allowAddingOtherThemes": true, "allowFractionalZoom": false, "localeAwareNumbers": false, "geodesicMeasurements": true, "trustWmsCapabilityURLs": false, "identifyTool": "Identify", "wmsDpi": 96, "wmsHidpi": false, "wmsMaxGetUrlLength": 2048, "qgisServerVersion": 3, "defaultColorScheme": "default", "username": "admin", "defaultFeatureStyle": {"strokeColor": [0, 0, 255, 1], "strokeWidth": 1, "strokeDash": [4], "fillColor": [255, 0, 255, 0.33], "circleRadius": 10, "textFill": "black", "textStroke": "white", "textFont": "11pt sans-serif"}, "importLayerUrlPresets": [{"label": "Swisstopo WMTS", "value": "https://wmts10.geo.admin.ch/EPSG/2056/1.0.0/WMTSCapabilities.xml"}], "projections": [{"code": "EPSG:3857", "label": "WGS 84 / Pseudo-Mercator"}, {"code": "EPSG:4326", "label": "WGS 84"}], "themeService": "http://127.0.0.1:8000/qwc2/themes.json", "services": {"ows": {"url": "http://127.0.0.1:8000/qwc2/ows/"}, "map": {"wmsUrl": "http://127.0.0.1:8000/qwc2/ows/", "mapName": "tc10000010"}}, "permalink": {"enabled": false}, "plugins": {"common": [{"name": "API"}, {"name": "AttributeTable"}, {"name": "BackgroundSwitcher", "cfg": {"position": 0}}, {"name": "BottomBar", "cfg": {"viewertitleUrl": "https://qwc-services.github.io/", "termsUrl": "https://qwc-services.github.io/", "viewertitleUrlTarget": "_blank"}}, {"name": "Editing", "cfg": {"allowCloneGeometry": true}}, {"name": "FeatureForm"}, {"name": "FeatureSearch"}, {"name": "HeightProfile", "cfg": {"heightProfilePrecision": 0}}, {"name": "Help", "cfg": {"bodyContentsFragmentUrl": "assets/help.html"}, "mapClickAction": "identify"}, {"name": "HomeButton", "cfg": {"position": 4}}, {"name": "Identify", "cfg": {"params": {"FI_POINT_TOLERANCE": 16, "FI_LINE_TOLERANCE": 8, "FI_POLYGON_TOLERANCE": 4, "feature_count": 20, "region_feature_count": 100}, "enableExport": true, "exportGeometry": true, "longAttributesDisplay": "wrap", "displayResultTree": false, "featureInfoReturnsLayerName": true, "clearResultsOnClose": true, "geometry": {"initialWidth": 480, "initialHeight": 550, "initialX": 0, "initialY": 0}}}, {"name": "LayerCatalog", "cfg": {"catalogUrl": "https://qwc2.sourcepole.ch/assets/catalog.json"}}, {"name": "LayerTree", "cfg": {"showLegendIcons": true, "showRootEntry": true, "showQueryableIcon": true, "allowMapTips": true, "mapTipsEnabled": false, "allowCompare": true, "allowImport": true, "groupTogglesSublayers": false, "grayUnchecked": false, "layerInfoWindowSize": {"width": 480, "height": 400}, "bboxDependentLegend": true, "scaleDependentLegend": "theme", "showToggleAllLayersCheckbox": true, "extraLegendParameters": ""}, "mapClickAction": "identify"}, {"name": "LocateButton", "cfg": {"position": 3}}, {"name": "Map", "cfg": {"mapOptions": {"zoomDuration": 250, "enableRotation": false, "panStepSize": 0.25, "panPageSize": 0.1, "constrainExtent": false}, "toolsOptions": {"OverviewSupport": {"tipLabel": "Overview"}, "LocateSupport": {"keepCurrentZoomLevel": true, "stopFollowingOnDrag": true, "startupMode": "DISABLED"}, "ScaleBarSupport": {"units": "metric"}}, "swipeGeometryTypeBlacklist": [], "swipeLayerNameBlacklist": []}}, {"name": "MapCompare"}, {"name": "MapCopyright", "cfg": {"showThemeCopyrightOnly": false, "prefixCopyrightsWithLayerName": false}}, {"name": "MapExport", "cfg": {"dpis": [96, 300], "exportExternalLayers": true, "defaultFormat": "image/png", "formatConfiguration": {"application/dxf": [{"name": "default"}], "image/png": [{"name": "default"}]}}}, {"name": "MapFilter", "cfg": {"allowCustomFilters": true, "allowFilterByGeom": true}}, {"name": "MapInfoTooltip", "cfg": {"elevationPrecision": 0, "includeWGS84": true}}, {"name": "MapLegend", "cfg": {"addGroupTitles": true, "addLayerTitles": true, "bboxDependentLegend": false, "onlyVisibleLegend": false, "scaleDependentLegend": false, "extraLegendParameters": "LAYERTITLE=FALSE"}}, {"name": "MapTip"}, {"name": "Measure", "cfg": {"showMeasureModeSwitcher": true, "snappingActive": false, "snapping": true}}, {"name": "Portal", "cfg": {"logo": "logo.svg", "topBarText": "", "showMenuOnStartup": true, "keepMenuOpen": true, "bottomBarLinks": [{"href": "https://qwc-services.github.io/", "label": "Homepage", "target": "iframe"}, {"href": "https://qgis.org", "label": "QGIS.org"}], "menuItems": [{"title": "Homepage", "icon": "info", "url": "https://qwc-services.github.io/", "target": "iframe"}, {"key": "Tools", "icon": "tools", "title": "Links", "subitems": [{"icon": "link", "title": "qwc2", "url": "https://github.com/qgis/qwc2/"}, {"icon": "link", "title": "qwc-docker", "url": "https://github.com/qwc-services/qwc-docker"}, {"icon": "link", "title": "qgis.org", "url": "https://qgis.org"}]}]}}, {"name": "Print", "cfg": {"inlinePrintOutput": false, "printExternalLayers": true, "gridInitiallyEnabled": false, "allowGeoPdfExport": true, "hideAutopopulatedFields": false}}, {"name": "ProcessNotifications"}, {"name": "Redlining"}, {"name": "Routing"}, {"name": "TopBar", "cfg": {"menuItems": [{"key": "Portal", "icon": "themes"}, {"key": "ThemeSwitcher", "icon": "themes", "shortcut": "alt+shift+t"}, {"key": "LayerTree", "icon": "layers", "shortcut": "alt+shift+l"}, {"key": "BackgroundSwitcher", "icon": "map"}, {"key": "MapLegend", "icon": "list-alt"}, {"key": "LayerCatalog", "icon": "catalog", "shortcut": "alt+shift+c"}, {"key": "FeatureSearch", "icon": "search"}, {"key": "Share", "icon": "share", "shortcut": "alt+shift+s"}, {"key": "Bookmark", "icon": "bookmark", "shortcut": "alt+shift+b"}, {"key": "Tools", "icon": "tools", "subitems": [{"key": "Identify", "icon": "identify_region", "mode": "Region"}, {"key": "TimeManager", "icon": "clock"}, {"key": "Measure", "icon": "measure"}, {"key": "Redlining", "icon": "draw"}, {"key": "Editing", "icon": "editing"}, {"key": "FeatureForm", "icon": "featureform"}, {"key": "AttributeTable", "icon": "editing"}, {"key": "MapExport", "icon": "rasterexport"}, {"key": "Routing", "icon": "routing"}]}, {"key": "Print", "icon": "print", "shortcut": "alt+shift+p"}, {"key": "Help", "icon": "info", "shortcut": "alt+shift+h"}, {"key": "Settings", "icon": "cog"}, {"title": "Homepage", "icon": "link", "url": "https://qwc-services.github.io/", "target": "iframe"}], "searchOptions": {"allowSearchFilters": false, "hideResultLabels": false, "minScaleDenom": 1000, "zoomToLayers": false, "showProvidersInPlaceholder": false, "highlightStyle": {"strokeColor": [255, 0, 0, 1], "strokeWidth": 1, "strokeDash": [4, 1], "fillColor": [255, 0, 0, 0.33]}}, "appMenuClearsTask": true, "appMenuFilterField": true, "appMenuVisibleOnStartup": false, "logoUrl": "/", "appMenuShortcut": "alt+shift+m", "toolbarItemsShortcutPrefix": "alt+shift"}}, {"name": "ScratchDrawing"}, {"name": "Settings", "cfg": {"languages": [{"title": "English", "value": "en-US"}, {"title": "Deutsch", "value": "de-CH"}, {"title": "Fran\u00e7ais", "value": "fr-FR"}, {"title": "Italiano", "value": "it-IT"}], "colorSchemes": [{"titleMsgId": "colorschemes.default", "value": "default"}, {"titleMsgId": "colorschemes.highcontrast", "value": "highcontrast"}, {"titleMsgId": "colorschemes.dark", "value": "dark"}]}}, {"name": "StartupMarker", "cfg": {"removeMode": "onclickonmarker"}}, {"name": "ThemeSwitcher", "cfg": {"collapsibleGroups": true}}, {"name": "TimeManager", "mapClickAction": "identify", "cfg": {"markerConfiguration": {"markersAvailable": true, "gradient": ["#f7af7d", "#eacc6e", "#fef89a", "#c5e09b", "#a3d29c", "#7cc096", "#79c8c5", "#34afce"], "markerOffset": [0, 0], "markerPins": true}, "cursorFormat": "datetime", "dateFormat": "DD.MM.YYYY[\n]HH:mm:ss", "defaultAnimationInterval": 1, "defaultStepSize": 1, "defaultStepUnit": "d", "defaultTimelineMode": "infinite", "stepUnits": ["s", "m", "h", "d", "M", "y", "10y", "100y"], "defaultTimelineDisplay": "features"}}], "mobile": [{"name": "BottomBar", "cfg": {"displayCoordinates": false, "displayScales": false}}], "desktop": [{"name": "TaskButton", "cfg": {"position": 5, "task": "LayerTree", "icon": "layers"}}, {"name": "TaskButton", "cfg": {"position": 6, "task": "Editing", "icon": "editing"}}, {"name": "ZoomIn", "cfg": {"position": 2}}, {"name": "ZoomOut", "cfg": {"position": 1}}, {"name": "TopBar", "cfg": {"toolbarItems": [{"key": "Measure", "mode": "LineString", "icon": "measure_line"}, {"key": "Measure", "mode": "Polygon", "icon": "measure_polygon"}, {"key": "Print", "icon": "print"}, {"key": "Identify", "icon": "identify_region", "mode": "Region"}]}}]}, "restoreState": false, "storeState": false, "initialTheme": "tc10000010__zs4", "defaultTheme": "tc10000010__zs4", "activeTheme": "tc10000010__zs4", "assetsPath": "/qwc2/assets", "translationsPath": "/qwc2/translations", "defaultMapCrs": "EPSG:3857"}

{"themes": {"title": "root", "subdirs": [], "items": [{"id": "tc10000010", "name": "tc10000010", "title": "tc10000010", "url": "http://127.0.0.1:8000/qwc2/ows/", "onlineResource": "http://127.0.0.1:8000/qwc2/ows/", "expanded": true, "mapCrs": "EPSG:3857", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033]}, "initialBbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033]}, "extent": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "sublayers": [{"name": "TCGIS", "title": "TCGIS", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "fdc_bpp_location", "title": "fdc_bpp_location", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "parcels", "title": "parcels", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "work_zones", "title": "work_zones", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "subzones", "title": "subzones", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "Counties", "title": "Counties", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "NAIP22_NCCIR_60cm", "title": "NAIP22_NCCIR_60cm", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}], "drawingOrder": ["TCGIS", "fdc_bpp_location", "parcels", "work_zones", "subzones", "Counties", "NAIP22_NCCIR_60cm"]}, {"id": "tc10000010__zs4", "name": "tc10000010__zs4", "title": "tc10000010 (Zone Set 4)", "url": "http://127.0.0.1:8000/qwc2/ows/", "onlineResource": "http://127.0.0.1:8000/qwc2/ows/", "expanded": true, "mapCrs": "EPSG:3857", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033]}, "initialBbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033]}, "extent": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "sublayers": [{"name": "TCGIS", "title": "TCGIS", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "fdc_bpp_location", "title": "fdc_bpp_location", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "parcels", "title": "parcels", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "work_zones", "title": "work_zones", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "subzones", "title": "subzones", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "Counties", "title": "Counties", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}, {"name": "NAIP22_NCCIR_60cm", "title": "NAIP22_NCCIR_60cm", "visibility": true, "queryable": true, "opacity": 255, "styles": {"default": "default", "url": "http://127.0.0.1:8000/qwc2/ows/"}, "style": "default", "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "url": "http://127.0.0.1:8000/qwc2/ows/"}, "dimensions": [], "url": "http://127.0.0.1:8000/qwc2/ows/"}], "drawingOrder": ["TCGIS", "fdc_bpp_location", "parcels", "work_zones", "subzones", "Counties", "NAIP22_NCCIR_60cm"]}], "defaultTheme": "tc10000010__zs4", "defaultMapCrs": "EPSG:3857", "defaultWMSVersion": "1.3.0", "extent": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033], "bbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033]}, "initialBbox": {"crs": "EPSG:3857", "bounds": [-10939079.47358671, 3491209.3309202273, -10835721.994068539, 3595593.0647358033]}}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions