Questions tagged [location]
Real-world geographic locations can be associated with Drupal entities.
318
questions
1
vote
1
answer
980
views
Apache Solr Proximity Search and sort by Distance
I wrote a custom module to perform a search of an index I created using Search API and Search API Solr Search. The search is a proximity search that finds the closest locations using a bounding box, ...
0
votes
1
answer
575
views
How to fix "GeoType" plugin does not exist
I'm following this tutorial. I've installed the geofield module and all needed for it wo work. I finally manage to create a content type "Place" with a field of type geofield. When i then create a new ...
0
votes
1
answer
500
views
Multiple points openlayers geojson display only the last of it
I made a module retrieving data with geodata. The import feature allows to create a file in geojson. So, i'd like to display the points and the data without using Views, only openlayers module.
I saw ...
0
votes
1
answer
483
views
Location's Distance/Proximity exposed filter without Node Location Submodule but with Location CCK Submodule instead
I would like to stay a little bit more flexible and use Location CCK fields (from Location CCK Submodule) instead of Node Locations (from Node Locations submodule) on my nodes. However, in my view of ...
0
votes
1
answer
564
views
Location taxonomy
I want to add a location to my products/articles in 2 different ways :
-user enters a town (linked to a taxonomy) -> I know how to do it
-user enters a county which is automaticly linked to a ...
0
votes
1
answer
529
views
How to configure gmap in template file
I override node display for content type Match Fixtures by creating node--match-fixtures.tpl.php file and put code below:
<?php
$location = $content['field_stadium'][0]['#locations'];
$stadium_map ...
1
vote
1
answer
560
views
Fixing identical Latitude/Longitude data for markers on maps (bug)
I have a Drupal 7 project that I want to add location information (latitudinal/longitudinal) to most of my content types.
Currently I have noticed that if there are multiple nodes that are shown on a ...
0
votes
1
answer
583
views
Gmap not displaying
I have Gmap and Location module. I have created a content type and also added a field location with term reference(Taxonomy term). I have just added a content and selected one location. But I can't ...
1
vote
1
answer
653
views
Importing shapefiles/kml
I need to add support for importing either kml file or shapefiles, preferably using feeds. The idea is that each record relates to a single node, and the file uploaded could contain hundreds of new ...
0
votes
2
answers
1k
views
Unable to set the data property xxx as the parent data structure is not set
I currently use geofield to set latitude and longitude but rules gives me this error:
0 ms Unable to modify data "user:field-coordonnees:lon": Unable to set the data property lon as the ...
0
votes
1
answer
1k
views
Get locations search: Show all markers by default
I played around with the get locations module for drupal escpecially with the get locations search part.
Finally I got the thing working but I'm wondering now if it's possible to display by default ...
4
votes
1
answer
1k
views
Adding "Directions To" to Geofield Map
I have a content type with a Location text field and a Geofield. The Geofield is geocoding the Location field into a coordinate and displaying it to a Google Map embed on the page.
This is working ...
5
votes
1
answer
179
views
How does the Geolocation content of a page filter is a Views block?
I have a website with Drupal 9 and the Geolocation module :
https://www.drupal.org/project/geolocation
I created a content type with a Geolocation field that contains coordinates.
My website uses the ...
0
votes
0
answers
45
views
How to create commerce store resolver using user proximity / location
For a custom store resolver using store location proximity to user location, is it necessary to create a completely separate module or can the custom resolver be located somewhere within the commerce ...
3
votes
2
answers
202
views
How do I implement georeferencing? [closed]
I must make a website with geo-referenced content. And I would like to add POI and the possibility to download this POI for GPX, KML\KMZ (Google Earth), etc.
Do you have any tip or idea on how to ...
1
vote
1
answer
645
views
geofield and leaflet maps: how to show proximity-originator on map?
My Goal:
Show a hotel on a map, together with nearby restaurants.
Currently, i have only a table, based on a view with the hotel's node-id as contextual filter.
Now i'd like to put all that in a map....
0
votes
1
answer
125
views
Programmatically set latitude and longitude exposed input
I've been using geolocation 8.x-1.12 for a while now. I have a REST route that gets a view with my exposed form and returns the results.
Previously I did:
$plugin = \Drupal::service('plugin.manager....
-1
votes
1
answer
537
views
Smart IP doesn't show countries
I want to get visitors' latitude, longitude, and country name. I am using the Smart IP module, but it won't show those details.
How can I get that data?
I need this information to create view's ...
1
vote
1
answer
812
views
How to send a custom Solr Distance Query with SearchApi
My nodes have a geofield and my search query should find all the nodes within a range.
I've managed to create a search form against my Solr Server with views. But I want to do the request by myself (...
0
votes
1
answer
31
views
Geolocation open InfoWindow on load
I can't get my head around the following. I'm using the Geolocation module to show a map on my website and I want the InfoWindow to be open by default.
I found that this should be possible by using ...
11
votes
7
answers
9k
views
Disable vertical tabs by content type or user role
Some users may only have the ability to edit one of the fieldsets that shows up in vertical tabs on the node edit form. In such a case it looks rather silly to be using vertical tabs since there is ...
-1
votes
1
answer
287
views
Search API location distance filter not working
I'm trying to create a search page with Search API Solr, Search API location and a Geolocation field.
I've got my view, and my lat/lng fields are correctly indexed. E.g. I've selected these fields for ...
0
votes
1
answer
325
views
The geographic data (latitude, longitude) isn't saved in content
I have installed the Geofield module, created a new content type, and added a geofield field.
When I start to add nodes with latitude and longitude, those values aren't saved. Editing again the same ...
1
vote
2
answers
882
views
country based product price should be changed in commerce kickstart?
I have installed commerce kickstart. I have to add the two prices for single product.
If Indian subscribers view the site means product price should display as
2000 INR.
If other users ...
-2
votes
1
answer
392
views
User taxonomy by location
I am trying to add taxonomy to my user location.
User A lives in Berkshire, UK, User B clicks at "berkshire, Uk" in Profil of User A and get a list of all Users who lives there. For example look at ...
10
votes
5
answers
6k
views
Programmatically Update Geofield Data
My setup is:
Addressfield on nodes to collect address data
Geofield using "Geocode from another field" choosing the addressfield and the Google Geocoder
When I edit/save a node in the UI, the data ...
0
votes
1
answer
203
views
How can I get lat/lon from an address?
I have these modules
addressfield
geofield
geocoder
Is there any function to which I can pass an address like Stree, zipcode city, Country and it returns a lat/lon from that address?
I have ...
0
votes
0
answers
531
views
Geolocation and view proximity filter - Can you default proximity to zero?
I'm trying to see if there is a way to default the views proximity filter to input zero for proximity values when the filter is empty, so we can sort the data using a different field by default.
What ...
1
vote
1
answer
2k
views
Current user geographical location [closed]
I am building a website which on the contact page will have a section to find your local sales representive. I intend to do this by having a content type of sales rep with a location field and ...
0
votes
1
answer
66
views
Building views relationship with location
I have an article and food content types. I use location module fields in both content types. So for example, when I write an article about restaurants in New York, I choose article's location as ...
0
votes
1
answer
101
views
Location Contextual Filter: Distance/Proximity works for all nodes but one
Drupal 7 site with Location and Location CCK modules.
Client has custom content type with Location field provided by Location CCK module.
Each Location node has a Views block display of Nearby ...
2
votes
1
answer
870
views
How to show the distance relative to the user's location?
I'm trying to recreate a site, and one part of the content is supposed to show the distance relative to the user's location, like this:
Does anyone know of a way I can accomplish this?
0
votes
2
answers
618
views
Converting iso code to name
How can i convert country iso code to country name while creating a node programatically using node_save? I am creating nodes programatically by fetching contents from secondary database of drupal. ...
1
vote
0
answers
625
views
Leaflet appears as Grey Box and Zoom not working [closed]
I am using geofield and leaflet.widget in a content type field. I have a leaflet view containing nodes with these field locations.
Upon displaying the view at first a grey box appears in place of the ...
0
votes
1
answer
27
views
Location subfields problem to render in teaser template node
I have tried render only two array´s parameters. Street and postal code but don´t display anything this code.
<?php print render($content['field_mapa']['und'][0]['street']); ?>and <?php ...
3
votes
1
answer
432
views
Add a map for each node in a view
I am building a restaurant application which would have a search functionality, and when somebody searches of restaurants for a zip code, it would return the data. The data would be the name of the ...
0
votes
1
answer
77
views
How to create a theme function for overriding Address Field theming?
How do you create a theme function for overriding the formatting of an Address Field in Drupal 7? I didn't want to create a CTools plugin or work with render arrays.
0
votes
3
answers
7k
views
How to get country list array with their corresponding country codes
I have used $countries = \Drupal\Core\Locale\CountryManager::getStandardList(); to render array of countries with country code as their keys. But when I debug the variable $countries; print_r($...
6
votes
1
answer
792
views
Hide user fields on profile2 registration form
I am working on multi-user website with 3 roles in Drupal 7 website. I'm using profile2 module for custom fields for different users, also profile2 path for profile/user registration.
Problem came up ...
1
vote
1
answer
2k
views
Redirect visitor based upon geolocation
On a Drupal website I want to redirect the visitor to a landing page based on the users location. I need this to be more specific than just the users country, but rather I need the province inside the ...
1
vote
0
answers
501
views
Location module incorrect continent and country mapping?
I have a view listing the shops by geographical location. The shops content type is using location CCK field and the same is used in view to filter by continent and country as below, with a custom js ...
5
votes
2
answers
2k
views
How can I pass the filter parameters of one view to a different view on the same page?
Summary
I have two seperate views on the same page - one Page and one Block that show two seperate content types respectively, but have a filter exposed for a field that they share.
On the page of ...
0
votes
2
answers
110
views
How to filter users based on address location?
I have a content type "job". There is a field "location" which contains the zip code of area. Now i want to filter users based on distance from job's zip code. Each user also have a zip code.
I ...
1
vote
3
answers
609
views
How to reduce options for units of measurement to just miles and km for proximity search
Using geofield with Views and exposed filters to the user to search for things on the map within a certain radius of a particular location.
I only require miles and kilometres as units of measurement,...
0
votes
1
answer
31
views
geolocation_views: show combined data in tooltip
I have two content types that work together:
"place": a place on a map (via a geolocation field)
"object": an object that is in a specific "place" (referenced via an entityreference field)
Several "...
3
votes
3
answers
3k
views
How do I have points and polygons in the same Leaflet map?
I have two content types
Location that geocodes an addressfield to place markers on the map
Boundary that uses a geojson field to create complex shapes on the map
I need to use views to show both ...
1
vote
1
answer
276
views
How do I show the weather block based on Geofield on a Taxonomy Term
The Weather module has a block to show weather based on IPs on a node defined by the geofield module. There doesn't seem to support if it is on a taxonomy term. How can I modify this code to support ...
1
vote
0
answers
232
views
View that displays map with clustered points and Streetview option
I need to construct a map block that displays multiple location markers with the following characteristics:
Markers are linked to other content on the page.
Markers are clustered until you zoom in ...
0
votes
2
answers
95
views
Create a Gmap with Views that connects locations of different nodes
I am looking for a way to make some sort of roadtrip website.
The idea is to use two node types: a parent nodetype "Roadtrip" and a child nodetype "Day". The user can create a Roadtrip and add a ...
-1
votes
1
answer
39
views
how to get location tokens to work in pathauto
I am attempting to use a city location in the URL via pathauto. I have this for the URL [node:title]/[node:location:city:0]
When I create a new node, however, only the title is inserted into the URL.
...