All Projects → springload → Wagtailgmaps

springload / Wagtailgmaps

Licence: mit
Simple Google Maps address formatter for Wagtail fields

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Wagtailgmaps

Wagtail Geo Widget
Wagtail-Geo-Widget is the complete map solution for your Wagtail site.
Stars: ✭ 90 (+32.35%)
Mutual labels:  wagtail, google-maps
Bikedeboa
A (Progressive) Web App to find, map and review bike parkings in the cities of Brazil.
Stars: ✭ 54 (-20.59%)
Mutual labels:  google-maps
Wanderlust The Travellers App
👟 An android application for travellers which allows them to save their journey experiences at one place in an organizable way. For detailed description, read the README.md file. Moreover, the application's design follows the latest HCI and UI/UX design guidelines.
Stars: ✭ 23 (-66.18%)
Mutual labels:  google-maps
Magento2 Google Address Lookup
Provides an address lookup service on a Magento 2 store powered by the Google Places API
Stars: ✭ 46 (-32.35%)
Mutual labels:  google-maps
Custombottomsheetbehavior
Custom BottomSheetBehavior for Android that mimic Google Maps behavior
Stars: ✭ 844 (+1141.18%)
Mutual labels:  google-maps
Hrcarmarkeranimation
This android library is helpful for google map marker animation with Smooth turn and movement.
Stars: ✭ 52 (-23.53%)
Mutual labels:  google-maps
React Google Maps Api
React Google Maps API
Stars: ✭ 791 (+1063.24%)
Mutual labels:  google-maps
Curve Fit
Curve-Fit is an Android library for drawing curves on Google Maps
Stars: ✭ 63 (-7.35%)
Mutual labels:  google-maps
Django Places
A django app for store places with autocomplete
Stars: ✭ 55 (-19.12%)
Mutual labels:  google-maps
Maplace.js
A Google Maps Javascript plugin for jQuery.
Stars: ✭ 1,021 (+1401.47%)
Mutual labels:  google-maps
Slopeninja Frontend
Slope Ninja Frontend 🏂❄️⛄️
Stars: ✭ 39 (-42.65%)
Mutual labels:  google-maps
React Native Maps Directions
Directions Component for `react-native-maps`
Stars: ✭ 846 (+1144.12%)
Mutual labels:  google-maps
React Native Bottom Sheet Behavior
react-native wrapper for android BottomSheetBehavior
Stars: ✭ 1,068 (+1470.59%)
Mutual labels:  google-maps
Disatbot
DABOT: Disaster Attention Bot
Stars: ✭ 26 (-61.76%)
Mutual labels:  google-maps
Leaflet Geoman
🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+1500%)
Mutual labels:  google-maps
Sketch Map Generator
Sketch plugin to fill a shape with a map generated from a given location using Google Maps and Mapbox
Stars: ✭ 824 (+1111.76%)
Mutual labels:  google-maps
Pizza Delivery
university project : Android pizza delivery app
Stars: ✭ 32 (-52.94%)
Mutual labels:  google-maps
Mygoogleplaces
A simple demo of Google Places.
Stars: ✭ 46 (-32.35%)
Mutual labels:  google-maps
Making Maps With React
🌐 Example React components for React-Leaflet, Pigeon Maps, React MapGL and more
Stars: ✭ 66 (-2.94%)
Mutual labels:  google-maps
Wagtail Factories
Factory boy classes for wagtail
Stars: ✭ 58 (-14.71%)
Mutual labels:  wagtail

wagtailgmaps PyPI

Simple Google Maps address formatter and LatLng provider for Wagtail fields.

Check out Awesome Wagtail for more awesome packages and resources from the Wagtail community.

Wagtailgmaps screenshot

Quickstart

Setting Up Your Google API Key

  1. Follow the instructions to get a key
  2. Enable the following services under API Restrictions:

Google_API_Screenshot

Installing and Configuration the Python Package

  1. Install with pip install wagtailgmaps

  2. Add wagtailgmaps to your settings.py INSTALLED_APPS section.

  3. Add some configuration in your settings.py file:

    # Mandatory
    WAGTAIL_ADDRESS_MAP_CENTER = 'Wellington, New Zealand'  # It must be a properly formatted address
    WAGTAIL_ADDRESS_MAP_KEY = 'xxx'
    
    # Optional
    WAGTAIL_ADDRESS_MAP_ZOOM = 8  # See https://developers.google.com/maps/documentation/javascript/tutorial#MapOptions for more information.
    WAGTAIL_ADDRESS_MAP_LANGUAGE = 'ru'  # See https://developers.google.com/maps/faq#languagesupport for supported languages.
    
  4. Use it:

    # myapp/models.py
    from django.db import models
    from wagtail.wagtailcore.models import Page
    from wagtailgmaps.edit_handlers import MapFieldPanel
    
    class MapPage(Page):
        # Wagtailgmaps expects a `CharField` (or any other field that renders as a text input)
        formatted_address = models.CharField(max_length=255)
        latlng_address = models.CharField(max_length=255)
    
        # Use the `MapFieldPanel` just like you would use a `FieldPanel`
        content_panels = Page.content_panels + [
            MapFieldPanel('formatted_address'),
            MapFieldPanel('latlng_address', latlng=True),
        ]
    
    # myapp/templates/myapp/map_page.html
    <a href="http://maps.google.com/?q={{ self.formatted_address }}">Open map (Formatted Address)</a>
    <a href="http://maps.google.com/?q={{ self.latlng_address }}">Open map (Lat/Long Address)</a>
    

Additional information

MapFieldPanel options

  • heading - A custom heading in the admin, defaults to "Location"
  • classname - Add extra css classes to the field
  • latlng - Field returns a LatLng instead of an address
  • centre - A custom override for this field
  • zoom - A custom override for this field

How the address option works under the hook

If using the address option, the field gets updated according to the Google Geocoding Service each time:

  • The map marker gets dragged and dropped into a location (dragend JS event).
  • Click happens somewhere in the map (click JS event).
  • Return key is pressed after editing the field (enterKey JS event for return key only).

Troubleshooting

When editing the model from the admin interface the affected field shows up with a map, like the screenshot above. If it doesn't, check your browser console to make sure that there is no error related to your API key.

Development

Releases

  • Make a new branch for the release of the new version.
  • Update the CHANGELOG.
  • Update the version number in wagtailgmaps/__init__.py, following semver.
  • Make a PR and squash merge it.
  • Back on master with the PR merged, use make publish (confirm, and enter your password).
  • Finally, go to GitHub and create a release and a tag for the new version.
  • Done!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].