google-maps-markers

Android: How to to set imageView as a marker in google map API android?

泪湿孤枕 提交于 2019-12-10 14:11:33
问题 till now i was using drawable to populate marker on my map .Now i was wondering it would be cool if i could display custom imageview as a marker in map. till now i am doing it like itemized= new Itemazide(drawable, mContext); i want to achieve something like 回答1: Yeah I was wondering if I could do something like this, i.e. show a custom View instead of drawable. You can override draw() method, but unfortunately it always (someone please tell me I'm wrong) has to be drawable. I think it's

GMSThreadException occur when displaying GMSMarkers on iOS Simulator

偶尔善良 提交于 2019-12-10 13:40:00
问题 I'm developing an app to display about 200 GMSMarkers on GMSMapView I tried 2 methods to display the markers. Method1 is a bit slow but no error occur, however, Method2 runs smoothly on a real device but I got GMSThreadException when I test it on iOS Simulator Here are the questions: 1. Is it ok to keep using method2? 2. If it is not ok to keep using method2, any good suggestions to reduce the loading time for the whole process? func Method1() { for location in locationsArrayFromSomeWhere {

receiving ambiguous sky screen while loading google map

不羁岁月 提交于 2019-12-10 13:19:41
问题 while loading google map on device i am receiving below screen sometimes.it comes on second load as shown below. otherwise it comes perfectly as normal google map with route I am using SupportmapFragment and get googleMap object as. supportMapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map_view_fragment); below is code for displaying map in activity/fragment public static void drawRouteIntoMap(final List<? extends MapHelper> position, final GoogleMap

Leaflet.label not showing over the markers

别说谁变了你拦得住时间么 提交于 2019-12-10 12:47:44
问题 I am having a set of geoJSON points and they have corresponding labels attached to them. var points = L.geoJson (null, { onEachFeature: function (feature, layer) { layer.options.riseOnHover=true; //tried adding this layer.options.riseOffset=9999; //as well as this layer.bindLabel(feature.properties["name"], {className: 'map-label'}); L.setOptions(layer, {riseOnHover: true}); //this as well } }); This is the code that goes through each feature in JSON file and creates set of points. Now, the

Android map v2-Get marker position on marker click

丶灬走出姿态 提交于 2019-12-10 12:17:55
问题 How to get marker item position on marker click just like in ListView's itemclick? ok i got the answer @Override public void onInfoWindowClick(Marker marker) { // TODO Auto-generated method stub System.out.println("onInfoWindowClick method calling and marker position is "+marker.getPosition()); String title =marker.getTitle(); for(int i=0;i<CommonUtilities.CoffeeShop_array_list.size();i++){ String s =CommonUtilities.CoffeeShop_array_list.get(i).Title; if(title.equalsIgnoreCase(s)){ **marker

Directional arrow from source to destination driving directions

拟墨画扇 提交于 2019-12-10 11:52:06
问题 What I want : My app requires plotting driving directions from source to destination, which is done.My problem is I need a directional arrow pointing from source to destination. What have I done: I am able to draw an arrow, also I have calculated angle but don't know how to apply that angle to the code so that the arrow rotates... I have tried all code..nothing works,the arrow gets drawn at source but points in wrong direction. PS: I have tried this Direction between two GeoPoints in Google

Google Maps Spiderfying Markers & Adding Listeners

送分小仙女□ 提交于 2019-12-10 11:45:49
问题 I'm trying to Spiderfy my markers and adding listeners to them. The Spidefying works fine that means I get the overlapping markers spiderfied but the problem is that I can't seem to figure how to add listeners to these markers. In other words I have tried the following: Putting the oms.addListener() in a loop. This way, upon clicking on a marker would open all infoWindow s on the same marker which isn't delightful. Putting the oms.addListener() outside the loop like the example on the OMS Git

Google Maps Markers not rendering in Chrome v27

隐身守侯 提交于 2019-12-10 11:05:39
问题 Using Chrome v27.0.1453.93. Markers do not render using the latest google maps api version. Markers render in Safari and FF. Chrome development tools indicate an Uncaught Type Error in Line 10 of https://maps.gstatic.com/intl/en_us/mapfiles/api-3/13/2/main.js. I removed the deprecated MarkerImage class but it's still throwing a js error in Chrome. This used to work. Implemented url is here. Anyone else seeing this? Thanks in advance. 回答1: I found a solution to this problem: add the parameter

Prevent google overlay/infowindow from allowing clicks through to markers underneath

让人想犯罪 __ 提交于 2019-12-10 10:58:24
问题 I'm trying to make some custom Google maps info windows, but I'm getting the issue where markers underneath my custom info window is clickable through the info window. Here's an example (basically straight from googles example here) <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Google Maps JavaScript API v3 Example: Info Window Custom</title> <script type="text/javascript" src=

Disable click on polygon

这一生的挚爱 提交于 2019-12-10 10:32:52
问题 I have the following code to highlight an area on google maps using the javascript v3 api. // Maps $(document).ready(function(){ if($(document).find("map_canvas")) Maps.init(); }); var Maps = {}; //The map to display Maps.map; //List of markers Maps.markers = new Array(); Maps.markers.previous; Maps.lines = new Array(); Maps.lines.toStart; Maps.area; //init the map Maps.init = function() { var mapOptions = { center: new google.maps.LatLng(-39.483715,176.8942277), zoom: 15, mapTypeId: google