google-maps-markers

How to show labels with direction on google map api

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-26 04:54:36
问题 I would like to show a label with a direction icon similar to the one shown in the picture (captured from default embedded iframe). The following is my current code. google.maps.event.addDomListener(window, 'load', init); var lat = 25.2091043; var lng = 55.2725799; function init() { var mapOptions1 = { zoom: 18, center: new google.maps.LatLng(lat, lng), mapTypeId: google.maps.MapTypeId.ROADMAP }; var contentString = '<div id="content">'+ '<div id="siteNotice">'+ '</div>'+ '<h2 class="title

Javascript, How can I make use of switch case in the zoom_changed listener in google maps?

偶尔善良 提交于 2020-01-26 04:43:07
问题 I have several markers on my webpage and I am making use of Overlapping Markers library : https://github.com/jawj/OverlappingMarkerSpiderfier . What I am trying to do is : When the user first lands on the webpage, the default zoom level is 6 . When they click on a bunch of overlapping markers, the markers don't spiderfy but rather zooms in on them to a zoom level of 9 . Once the zoom level == 9 , if they click on the markers, they will spiderfy and then they can click on individual markers

How to set Google maps marker size dynamically

。_饼干妹妹 提交于 2020-01-26 04:12:19
问题 I am trying to size my marker by zooming, but it seems not to work here is the code for a better overview: function Icon(url) { this.url = url; this.scaledSize = new google.maps.Size(30, 30); // scaled size //this.origin = new google.maps.Point(0,0); // origin //this.anchor = new google.maps.Point(0, 0); // anchor } var icon1 = new Icon('img/marker-test.png'); map.addListener('zoom_changed', function() { if(map.zoom === 18){ //marker.setIcon(test); console.log('check'); marker.scaledSize =

Hide particular marker google maps api

 ̄綄美尐妖づ 提交于 2020-01-26 04:11:05
问题 Using current code for google maps api i found on stackoverflow, i need to hide all markers except one clicked how can i do it? Not even sure how to approach it? I think it has to do with JS closures however not an expert on that. <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>Google Maps Multiple Markers</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> </head> <body> <div id="map

Primefaces GMap addMarker (JavaScript) + selectMarker (overlaySelectEvent)

青春壹個敷衍的年華 提交于 2020-01-25 01:12:06
问题 I have been struggling to combine both the GMap AddMarker and Selection examples from the Primefaces Showcase. What I try to achieve here is to get the overlaySelectEvent fired when clicking on a marker that has been added to the map using JavaScript, having also those markers in the map model, correctly in sync. JSF and JavaScript: <p:growl id="messages" showDetail="true" /> <p:gmap id="gmap" center="36.890257,30.707417" zoom="13" type="HYBRID" style="width:600px;height:400px" model="#

Primefaces GMap addMarker (JavaScript) + selectMarker (overlaySelectEvent)

a 夏天 提交于 2020-01-25 01:12:06
问题 I have been struggling to combine both the GMap AddMarker and Selection examples from the Primefaces Showcase. What I try to achieve here is to get the overlaySelectEvent fired when clicking on a marker that has been added to the map using JavaScript, having also those markers in the map model, correctly in sync. JSF and JavaScript: <p:growl id="messages" showDetail="true" /> <p:gmap id="gmap" center="36.890257,30.707417" zoom="13" type="HYBRID" style="width:600px;height:400px" model="#

Custom marker missing … sometimes

主宰稳场 提交于 2020-01-24 20:44:05
问题 We're using the static google maps API and things were going fine when suddenly it started getting hiccups with our custom marker icon. Sometimes it get's displayed as intended, sometimes we end up with the default marker and the yellow banner in the upper right corner stating: "Map error: g.co/staticmaperror". Taking a look at the headers we found that google seems to have issues fetching our marker image: x-staticmap-api-warning: Failed to fetch image url https://www.xyz.de/some_image.png I

How to get some information in google maps without click event on marker and show this in a div, other than infoWindow

雨燕双飞 提交于 2020-01-24 07:17:49
问题 Hi I am showing some markers on my google map and on click of the marker, I am calling the click event and showing some info about that place to the right side(area other than Map and not as an infoWindow). Now this event gets fired on click, and by default when page loads my div remains blank, How can I have the div the basic information being shown up once the map loads up. I need to show the information that corresponds to the marker that is the center point of the map, and later when the

How to open a new activity by using double click marker for Android Google Map app?

假如想象 提交于 2020-01-23 13:17:52
问题 I'm trying to use onMarkerClick , which allows users to view a new activity/window when they click on a marker. If want to change the behaviour so that a new activity is opened but only when I double click on a marker, how do I do it? This is my code: public class MapsActivity extends FragmentActivity implements OnMapReadyCallback, OnMarkerClickListener { private Marker myMarker; ChildEventListener mChildEventListner; DatabaseReference mProfileRef = FirebaseDatabase.getInstance().getReference

Deconflicting markers in map overlays

若如初见. 提交于 2020-01-23 13:02:35
问题 I need to solve the problem of marking thousands of items on a map in a way that's accurate and readable and fast even when the user zooms out so that markers would overlap in confusing ways. It's an Android MapView , but my questions are more general. I am aware of Fluster, grid-based schemes, and various heuristics. These algorithms appear to be inaccurate in that cluster markers don't correspond to the centroid. My application is safety critical, and the markers are fairly big, so