question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Show building name/location name on map

See original GitHub issue

I need to show building name/location name on map like this

Are there any ways to support this feature? Thank you.

link

// This example requires the Places library. Include the libraries=places
// parameter when you first load the API. For example:
// <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=places">

function initMap() {
  var map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: -33.866, lng: 151.196},
    zoom: 15
  });

  var infowindow = new google.maps.InfoWindow();
  var service = new google.maps.places.PlacesService(map);

  service.getDetails({
    placeId: 'ChIJN1t_tDeuEmsRUsoyG83frY4'
  }, function(place, status) {
    if (status === google.maps.places.PlacesServiceStatus.OK) {
      var marker = new google.maps.Marker({
        map: map,
        position: place.geometry.location
      });
      google.maps.event.addListener(marker, 'click', function() {
        infowindow.setContent('<div><strong>' + place.name + '</strong><br>' +
          'Place ID: ' + place.place_id + '<br>' +
          place.formatted_address + '</div>');
        infowindow.open(map, this);
      });
    }
  });
}

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
loriscommented, Jan 30, 2017

+1

1reaction
loriscommented, Jan 30, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

Give a place a private label - Android - Google Maps Help
Labeled places show up on your map, in search suggestions, in the "Your places" screen, and in Google Photos. ... At the bottom,...
Read more >
How to register my building name on Google Maps
Login to Google Map Maker using your google account, using satellite imagery and other land mark locate your building and add your building...
Read more >
Call Me By Your Name Filming Locations in Northern Italy
Want to know where ABSOLUTELY ALL of the Call Me By Your Name locations are in Italy? This is a FULL guide plus...
Read more >
Terraform - Building an Output Map
For example, one map that shows Resource Group Name, location, tags? Variable Definition variable "resource_groups" { description ...
Read more >
Using a Floor Plan or Custom Map in Dashboard - Cisco Meraki
Deleting/Renaming Custom Floor Plans · Select the Edit button next to the floor plan you'd like to rename · Name, location or image...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found