google-maps-markers

Get placeId on google maps when POI is clicked

不想你离开。 提交于 2019-12-03 21:03:19
I'm using Google Maps JS V3 API on my website. I'm able to use getDetails by placeId when user searches for a place. I would like to do the same when user clicks on a POI. However, I can't seem to find a way to get this placeId when user clicks on a POI instead of using the search box. I have done research for days, and had no luck of finding anything close. I came across this feature request, I wonder if there is really no way of getting the placeId by POI clicking: https://code.google.com/p/gmaps-api-issues/issues/detail?id=8113&q=poi&colspec=ID%20Type%20Status%20Introduced%20Fixed%20Summary

Google Maps v3 FontAwesome5

做~自己de王妃 提交于 2019-12-03 20:51:29
I am trying to create a googleMap that uses dynamic fontAwesome markers I can't seem to be able to set 'Font Awesome 5 Free' as the font to be used, though. I can set 'Fontawsome' which works, but is not a webfont (It's a .TTF installed in MY system) var marker0 = createMarker({ position: new google.maps.LatLng(33.808678, -117.918921), map: map, icon: { path: google.maps.SymbolPath.CIRCLE, fillColor: '#F00', fillOpacity: 1, strokeWeight: 0, scale: 15 }, label: { fontFamily: "FontAwesome", fontWeight: '900', text: eval("'\\u"+'f0ab'+"'"), color: 'white' } }, "<h1>Marker 0</h1><p>This is the

How to customize the InfoWindow of google map iOS SDK?

ぃ、小莉子 提交于 2019-12-03 20:38:53
I want to change the width of the InfoWindow of google map iOS SDK. Is there anyway to do? The reason I want to do it is to show the full address in the InfoWindow. Is there any other way to do so instead of customizing the InfoWindow? Also, can I change the text size in the InfoWindow? At least, I would like to achieve the effect like this map: http://www.google.com/about/company/facts/locations/ where hyperlink can be applied as well. Jing Set the map delegate to the view controller, then implement the google maps delegate method -(UIView *)mapView:(GMSMapView *) aMapView markerInfoWindow:

Google Maps overlay disappears at certain zoom level

北城余情 提交于 2019-12-03 20:37:10
I am having a problem with a custom overlay icon marker in google maps. It works fine at all zoom levels, but disappears at max zoom. In the demo only the lower icon disappears, but the upper one is ok. Demo: http://random.hypervolume.com/map_bug.html Try to zoom in on the lower marker, the one on 34-th street. At max zoom level it disappears. Here is the source: var map; function init() { var opts = { zoom: 14, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('mapcanvas'), opts); map.setCenter(new google.maps.LatLng(40.761231, -73.9839609)); new

How to geocode an address into lat/long with Google maps

南楼画角 提交于 2019-12-03 20:21:59
问题 I want to be able to plot several companies on a google map and understand I need to geocode these. I also have the code below that plot's multiple markers on a map. How can I Geocode several company addresses (using the following address as the first example) and incorporate it into the current code I have? I really need someone's help as I can't make sense of the Google documentation as well as incorporating it with what I already have. 回答1: you could use google's geocoding to obtain

How do I create a grid in google maps api v3

青春壹個敷衍的年華 提交于 2019-12-03 20:14:39
I'm new at this. What I'm trying to do is, created 2 markers (they are draggable), there will be grid between them, like http://prntscr.com/4nx9f3 . When I change one of the marker, grid should be changed. I am trying to draw with polylines. By the way i can not get latitude or longitute with marker1.getPosition().lat() . thanks for any help... all my code: <!DOCTYPE html> <html> <head> <title>Simple Map</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <style> html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px } </style> <script

How to draw polygon using hardcoded values in ngMap using angularjs

我怕爱的太早我们不能终老 提交于 2019-12-03 17:24:04
I need to draw polygon on google maps using the hard coded values.I have used ngMap ( https://ngmap.github.io/ )and used drawing manager of ngMap to it, because i also want the user to draw polygon dynamically. if i use drawing manager,i am not able to draw polygon with hardcoded values. and also another thing , if the user put the marker on map. i need to get the co-ordinates of it. (for example:get the co-ordinates in alert box or console). can anyone please help me Plunker here: http://plnkr.co/edit/keRsKthRAwX89WOWeYwZ?p=preview <ng-map zoom="12" center="28.623457, 77.196452" map-type-id=

Removing Markers in android

 ̄綄美尐妖づ 提交于 2019-12-03 17:20:52
I have a Global array Object like Marker marker_array[]; and later in Layout click I initialized it as marker_array = new Marker[8]; . I want to add markers to map on that layout and remove on 2nd click so I created clickcount Global variable with zero value. My proper code is here final RelativeLayout layout = (RelativeLayout) findViewById(R.id.track_div); layout.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { clickcount++; point_new = new LatLng[8]; point_new[0] = new LatLng(31.5301843, 74.3207487); point_new[1] = new LatLng(31.5214693,74.3236027);

How to check if there are any markers within a Google Maps viewport?

不打扰是莪最后的温柔 提交于 2019-12-03 16:50:18
What is the most effcient approach to check if there are any markers within a viewport? A perfect solution wouldn't require checking all the markers one-by-one if it's contained by the viewport. The best solution that I came up with is to on the application launch, create an array with reference to markers - sorted by 1 coordinate, i.e. latitude get viewport's bounds with GMap2.getBounds() (as paullb suggested) take lower latitude of viewport boundaries and look for it in the array (fastest to achieve with binary search) check if every following marker fits within the viewport (up to marker's

Google maps v3 default marker path with other colors

℡╲_俬逩灬. 提交于 2019-12-03 16:48:23
问题 My goal is to change the color of the nice looking default google maps marker. Therefore, I'm looking for the path / shape of the default (red) one. I've found this to change to color: function pinSymbol(color) { return { path: '???' fillColor: color, fillOpacity: 1, strokeColor: '#000', strokeWeight: 2, scale: 1 }; } So, by invoking the function, I would like to change the color (e.g. icon: pinSymbol("#666"). However, I don't know where to find the path? I'm not looking for the v2 / plain