11

You do not really need to write your own module (unless it does something out of the box) in order to use custom markers. Here is an guide how you can do that (I assume we use gmap module and views module to display google map. Upload you custom markers to Drupal website, f.x. to your theme folder (i.e. /sites/all/themes/yourtheme/images/markers or another ...


10

Just thought I'd point out in the this somewhat long-running thread that, due to an update, Dmytro Pastovenskyi's answer is no longer valid in 7.x-2.11. The "Custom markers path" field is still present in the UI form at /admin/config/services/gmap, however any value entered there is effectively ignored. What I did to get it working: Install the Libraries ...


7

The easiest way to use a view in a block (or anything that uses a build array) is as a render element: $node = \Drupal::routeMatch()->getParameter('node'); $current_nid = $node->id(); $view_arguments = [$current_nid]; $build['news'] = [ '#type' => 'view', '#name' => 'myviewname', '#display_id' => 'block_1', '#arguments' => $...


7

Finally i made it. First you make a content type for the items (in this case sted / place). Then you make or edit the content type where the relevant items is going to be displayed (in this case article). For the articles you add a reference field. The Type of item to reference is content and the content type to reference is your items content type. (I ...


5

You can embed a different View under "No results behaviour" e.g a View that lists all venues.


4

There are many ways you can do this. Go to maps.google.com, type in the address, get the link, then click the customize and preview embedded view. A popup should appear. Select the map size you want. Copy the html code and go to structure -> blocks -> add block, paste your code and select full html filter. And add your block to where you want it Download ...


4

I have been able to accomplish this task following these steps: Installed modules for search: search_api, search_api_location, search_api_solr search_api_views, search_api_facetapi, Search API location views Installed modules for "geosearch": geofield (to store lat, lon...), addressfield (make it easier for users to enter an address and don't worry about ...


3

Getlocations Module (https://drupal.org/project/getlocations) has been the first to bring the GMAP/Location Module (Google Maps V2 Api based) to Google Maps API 3 version. It has rapidly developed and extended its functionalities and is still actively developed … At the same time I would recommend the IP Geolocation Views & Maps (https://drupal.org/...


3

If your code sample is accurate, and you are calling drupal_add_js() from outside a function in a module file, then that will be the problem. You would want to add your js from within your hook_block_view(). This way it loads after drupal has done all it needs to do with its js and jQuery will exist. Also, you might not want to put your map initialisation ...


3

The API geocoder may be different from the Maps geocoder (see the FAQ in the API documentation). The results may even vary for users from different users from different countries. For me, Spier Wine Farm, Stellenbosch results on Google Maps in -33.9733628,18.7825561. In general, it seems that sometimes providing less information in an address results in ...


3

Eventually things got fixed, learned that you can just add a .js file into your module with the HOOK_init() since they get stored to use at a later stage. What obviously was causing the problem, was the wrong declaration of the API key, this was fixed by adding the line: drupal_add_js("https://maps.googleapis.com/maps/api/js?key=[MY API KEY]", "external"); ...


3

Usually you see this message when you don't have in the Geolocation module the Google API Key or the Google API Key is not working well. For this you need to go to: http://YOURSITE/admin/config/content/geofield_gmap Write your working Google API Key and save the Configuration. Edit: To apply the patch you need download the file to: sites/all/modules/...


2

For the benefit of others who stumble on this question in future - If you are using a Drupal 7 site, then you can use Location and Gmap modules for this. To allow picking of coordinates from a map you would have to edit the location module settings at admin/config/content/location and CHECK the option for using a google map as shown below


2

The best way is to use webforms to create your contact form. Make sure to use the option of creating the webform in a block. Create two more blocks. One containing the address and contact and the other containing your map. And using like panels or a page. arrange your blocks on that page.


2

I think you are looking for geofield gmap module, it have the option same like your requirement. See the below screenshot and also easy to configure. Geofield Gmap allow to use a google map v3 map to input a location. A quick text input + geocode allow you to specify an address. You can also drag and drop the marker to narrow the position. Geofield Gmap ...


2

This question is obviously very old, but I spent the last few hours figuring out the same issue and figured this might help someone else who is Googling this problem. The problem for me was this: In Modules, "Location Entity" should NOT be enabled. "Location CCK" (in the Fields section) should be. Then, when modifying the Content Types, do NOT rely on ...


2

Use simple google maps module. It is very simple and easy to use.


2

Using the following in my template.php file for my theme, I achieved what I wanted to do. function MY_THEME_preprocess_page(&$vars) { if (isset($vars['node']) && $vars['node']->type == 'venue') { drupal_add_js(drupal_get_path('theme', 'MY_THEME') . '/js/mapstyle.js', array('weight' => 15)); } } I couldn't add the JS to my ....


2

drupal_add_js(array('markers' => drupal_json_encode($markers)), 'setting'); Should be drupal_add_js(array('markers' => $markers), 'setting'); See https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_add_js/7. You will probably want to remove the drupal_json_encode($markers); as well. Also noted that you should use db_query instead ...


2

Thanks to @joemurray for pointing me in the right direction. This is my function to grab the closest nid to my target nodes lat, long. /** * * Load the nid we are interested in for this report taken from the page we are on. * [http://funkjedi.com/technology/308-search-using-geolocation-data-in-mysql/][1] */ function _load_proximity_nids($lat, $lon) { $...


2

It's a bit hard to say for sure but my guess is that you have missed a step when installing the location module. For post code proximity searching the location module uses a database of postcodes and their coordinates to convert the postcode to the lat/lon coordinates that are then used to calculate whether other locations fall in the request distance. See ...


2

Have you ever tried these two modules? https://www.drupal.org/project/gmap https://www.drupal.org/project/location With these two modules, you can create google maps and put your location data into a referenced google map.


2

So, I haven't found a way to convert it, but I did do the following. Update content with Addressfield and Geofield Set geofield to code from addressfield used views data export to export the data used feeds to spit the data into addressfield. This basically met my requirements, pretty laborious and had to do a lot of data integrity checking, but it did ...


2

If you want to use an existing module - something like GMap is probably the easiest place to start. That being said, the Google Map API is fairly easy to use, so nothing preventing you from writing a module that does exactly what you want.


2

Have a look at the IP Geolocation Views & Maps module. Partial quote from its project page: Despite what the name may suggest, IP Geolocation Views & Maps (IPGV&M) is first and foremost a mapping engine. The module makes it very easy to create Views-based mapping solutions using the map renderer of your choice (Google, OpenLayers or Leaflet) ...


2

I found from my seniors that these configurations (in this case GMap configurations) are stored in variables and Strongarm module can be utilised to export them. After enabling Strongarm module, these variables will be available for exporting under Strongarm Feature Component in Features UI. The other system/environment on which these variables need to be ...


2

Quote from the Comparison of mapping modules: GMap is considered a legacy module. So maybe you want to have a look at the IP Geolocation Views & Maps module. Partial quote from its project page: Despite what the name may suggest, IP Geolocation Views & Maps (IPGV&M) is first and foremost a mapping engine. The module makes it very easy to ...


2

Have a look at the IP Geolocation Views & Maps module. Partial quote from its project page: Despite what the name may suggest, IP Geolocation Views & Maps (IPGV&M) is first and foremost a mapping engine. The module makes it very easy to create Views-based mapping solutions using the map renderer of your choice (Google, OpenLayers or Leaflet) ...


2

You need to create a display in your content type where you will put the field that you want to show in the tooltip. Home » Administration » Structure » Content types » YOUR CONTENT TYPE » Manage display Then in your view select in the format to show Content and in the View mode the display that you created before with your fields.


1

Simply - edit your pager options in view to fit your needs.


Only top voted, non community-wiki answers of a minimum length are eligible