Preview Features
Q2G includes a built-in preview system to visualize your layers and styles:
- View layers in an interactive web map
- Preview styles before uploading
- Test layer visibility and symbology
- Check layer extents and properties
- View layer information and attributes
Opening the Preview
Preview Dialog
To open the preview for a layer:
- In the QGIS Layers panel, find the layer you want to preview
- Look for the preview button (usually labeled with an eye icon)
- Click the preview button
- The preview window will open showing the layer
Preview Window Layout
- Map Area: Interactive web map showing the layer
- Toolbar: Zoom, pan, and other controls
- Layer List: Available layers to display
- Information Panel: Layer details and properties
Map Controls
Navigation Controls
| Control | Function | Keyboard Shortcut |
|---|---|---|
| Zoom In | Zoom to a smaller area | + |
| Zoom Out | Zoom to a larger area | - |
| Pan | Move the map around | Click and drag |
| Fit to Extent | Zoom to layer extent | Home |
| Return to initial view | R |
Using the Q2G Controls
- Zoom: Use the + and - buttons or scroll wheel
- Pan: Click and drag the map
- Fit to Layer: Click the "Fit" button to zoom to layer extent
Viewing Layer Information
Layer Properties
The information panel shows:
- Layer Name: Name of the layer
- Type: Vector or Raster
- Geometry Type: Point, Line, Polygon, etc.
- CRS: Coordinate Reference System
- Extent: Bounding box coordinates
- Feature Count: Number of features (for vectors)
Attribute Information
For vector layers, you can view:
- Attribute table
- Data types for each attribute
- Sample values
Previewing Styles
Style Preview
The preview shows how your layer will appear with its current QGIS style:
- Open the preview for a layer
- The map will display the layer with its QGIS style
- Colors, symbols, and labels are shown
- You can verify the style looks correct
Testing Styles
Before uploading, test your styles:
- Modify the layer style in QGIS
- Open the preview
- Check if the style renders correctly
- Make adjustments if needed
- Upload when satisfied
Style Compatibility
Note that:
- Some QGIS styles may not convert perfectly to SLD
- Complex effects may not be supported
- Test on GeoServer after uploading
Feature Information
Clicking on Features
To get information about a feature:
- Click on a feature in the map
- A popup will show the feature's attributes
- You can view all attribute values
Feature Details
The popup shows:
- All attribute names and values
- Geometry type and coordinates
- Feature ID
Exporting from Preview
Export Options
From the preview window, you can:
- Export as Image: Save the current view as PNG/JPG
- Export as PDF: Save as a printable PDF
- Export Coordinates: Copy current extent
Exporting the Map
- Arrange the map view as desired
- Click the "Export" button
- Choose export format
- Select save location
- Click "Save"
Multiple Layer Preview
Viewing Multiple Layers
If you have multiple layers loaded:
- Open the preview
- Use the layer list to toggle layers on/off
- Adjust layer order if needed
- Check how layers interact
Layer Transparency
Adjust layer transparency:
- Use the opacity slider for each layer
- See through overlapping layers
- Test layer combinations
Troubleshooting Preview Issues
Preview Won't Open
- Ensure the layer has valid geometry
- Check the layer has a valid CRS
- Try refreshing the preview
- Check QGIS logs for errors
Layer Not Showing
- Check if the layer is enabled in the layer list
- Verify the layer has features
- Check the layer extent (may be zoomed out)
- Try "Fit to Extent" button
Style Not Showing Correctly
- Some QGIS styles may not preview perfectly
- Check the style in QGIS directly
- Simplify the style if needed
- Test on GeoServer after uploading
Performance Issues
- Large layers may be slow to render
- Try zooming to a specific area
- Reduce the number of visible layers
- Check your computer's resources
Best Practices
- Always Preview: Preview layers before uploading
- Check Styles: Verify styles render correctly
- Test Interactions: Check how multiple layers work together
- Verify Extent: Ensure layer extent is correct
- Check Attributes: Verify all attributes are present
Next Steps
- Layer Upload - Upload your previewed layers
- Style Management - Manage layer styles
- Troubleshooting - Solve common issues