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 ...


8

Perhaps this is useful: How the Drupal.org home page map works This is the actual module: HTML5 user geolocation


8

The approach should be map agnostic. You need to break things in two parts: Storing location data Displaying this data on a map 1) Data storage. You'll need three modules here: Address field to store addresses (http://drupal.org/project/addressfield) Geofield to store latitude/longitude (http://drupal.org/project/geofield) Geocoder to geocode addresses ...


7

Converting an IP to a latitude and longitude isn't a good idea since the user could be using a proxy. A better way would be to use HTML5 geolocation, which tries to get a location based on a couple of parameters: IP, wireless connection, cell tower location, GPS ... Try: navigator.geolocation.getCurrentPosition(show_map); function show_map(position) { ...


6

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' => $...


6

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

There's a actually a way to do this in Views UI. Add all your fields in Views as per usual On the bottom most field (ideally the one that's the bubble), edit it and click on "Rewrite results". (Note you can drag / reorder fields to get the right one at the bottom.) Check the box, "Rewrite the output of this field" Below that once expanded, you will see "...


5

A module will only be able to do so much to help you with this because everybody's maps and the precise regions that are highlighted and linked are different! So you probably would still have to create your own image map to implement the functionality. I image what they used is the jQuery Map HiLight module with an image map to create that page. The ...


5

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


4

Funny you should say that. I just fixed a bug in leaflet module that was preventing me from showing linestrings (i.e. a route). There are other ways of doing this but this is a good efficient way and leaflet maps are beautiful! Install the patched version (i.e. the latest and greatest version) of leaflet module - http://drupal.org/node/1707882 Apply the ...


4

Another option is the recently released Google Store Locator module on drupal.org. Some cool features: you can customize the map marker pins to be your own custom icon, and you can make the map 'location aware' which allows the user to share their location with the browser, and the map will re-center and zoom based on their location.


4

As suggested in the issue someone opened for the GMap project page, head to this page and follow the steps to obtain a key (Google account required).


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 ...


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 ...


3

I had a good experience with Geolocation Field. I used this module on dealing website to show location of store. It lets you mark location via node creation/edition form and have display formatter to rendering the address as PNG or Google map. It was simple and good enough.


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

Both the Open Layers project and the Gmap module support google maps. Both can work with a number of geolocation types. See the modules for more details. I am using both (in different sites) and either one can support what you are trying to accomplish. I would recommend Open Layers as more versatile, and Gmap as easier to use.


3

There is a Contrib module for this: the Geolocation module. Just download it, and install it. It actually it comes with 3 sub-modules you need to enable too. Then, when you add a new field to to a content type, you will get a new option for a geolocation field. In case you want to view the locations of all the contents of that content type on a single map, ...


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

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


2

try http://drupal.org/project/views_geojson with the latest version of views_geojson and openlayers you can define a view (of type geojson) that accepts a bounding box as a parameter. With openlayers you can set the layer to use a bbox strategy so when you drag the map around it will send the bbox coords to the geojson view and just return points within ...


2

Yes, but it will be complex to set up. If you're using Drupal 7, you can create a "Store" content type with checkbox fields that store the various attributes (24-hour service, airport locations, etc.) Then you can install the location module to assign a location to each store. You will need to enable the feature for converting the addresses you input into ...


2

A peek in the code reveals that the macro builder registers the path map/macro. function gmap_macro_builder_menu() { $items['map/macro'] = array( 'type' => MENU_NORMAL_ITEM, 'title' => 'Build a GMap macro', 'access arguments' => array('create gmap macro'), 'page callback' => 'drupal_get_form', 'page arguments' => array('...


2

You could create your own iframe: http://www.iframehtml.com/ You will most likely want to create custom page output so that you aren't including extra regions from your site. You can do so by creating a custom html.tpl.php template (might not be necessary) and page template for the map.


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