snipe-it
snipe-it copied to clipboard
[New Feature] Google maps extra options
Description
This PR will give extra configuration in Google Maps. You can set the Level of Zoom and the type of base map that you want to see in the location of the supplier and locations.
Documentation Support Google Maps: https://developers.google.com/maps/documentation/maps-static/start
Fixes # (issue) NA
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [X] Test extra parameters adding in env file: GOOGLE_MAPS_API=<Insert your key> GOOGLE_MAPS_MAP_TYPE_BASEMAP=hybrid GOOGLE_MAPS_ZOOM_LEVEL=21
With these variables, the result when adding a new location or supplier is to create a location image with satellite imagery and the labels of the streets and POIs.
Test Configuration:
- PHP version: 7.4.3
- MySQL version: 11.2.3
- Webserver version: Apache 2.4
- OS version: Windows 10 Pro
Checklist:
- [x] I have read the Contributing documentation available here: https://snipe-it.readme.io/docs/contributing-overview
- [x] I have formatted this PR according to the project guidelines: https://snipe-it.readme.io/docs/contributing-overview#pull-request-guidelines
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
#Observations:
Is my first PR in this project, I'm sorry if I miss some guideline of your contribution code. Greetings from Portugal.
💖 Thanks for this pull request! 💖
We use semantic commit messages to streamline the release process and easily generate changelogs between versions. Before your pull request can be merged, you should update your pull request title to start with a semantic prefix if it doesn't have one already.
Examples of commit messages with semantic prefixes:
-
Fixed #<issue number>: don't overwrite prevent_default if default wasn't prevented
-
Added #<issue number>: add checkout functionality to assets
-
Improved Asset Checkout: use new notification method for checkout
Things that will help get your PR across the finish line:
- Document any user-facing changes you've made.
- Include tests when adding/changing behavior.
- Include screenshots and animated GIFs whenever possible.
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.
PR Summary
-
Enhanced Configuration for Google Maps New configurations have been added to both
.env.docker
and.env.example
files to modify the behavior of Google Maps. This includes the API credentials and preferred map type. -
Modification in App Configuration In
app.json
, new definitions have been added to "Google" object, which provides more granular control over the attributes such as type of map and zoom level. -
Changes in Services Configurations Within the
config/services.php
file, added properties for setting the base map type and zoom level under thegoogle
section. These properties allow for a more customizable map experience. -
Improved Map Display Updates made to
view.blade.php
files inlocations
andsuppliers
directories. These changes will utilize the newly added configurations to enhance the visual presentation of maps.
Hi there - We haven't heard back in a bit, so I'm going to close this PR for now
Hi @snipe sorry for my delay.
Meanwhile my daughter born and I wasn't enable to answer or change your comments.
I'm sorry 😔 When I have more time I return to this.