google-maps-markers

Blurry / Corrupted Google Maps Controls

血红的双手。 提交于 2019-11-26 14:43:22
问题 I am seeing some really odd behaviour on my Google Maps app. I am using Backbone: initialize: -> osmMapType = new google.maps.ImageMapType( getTileUrl: (coord, zoom) -> "http://tile.openstreetmap.org/#{zoom}/#{coord.x}/#{coord.y}.png" tileSize: new google.maps.Size(256, 256) isPng: true alt: "OpenStreetMap layer" name: "OSM" maxZoom: 19 ) cloudMadeMapType = new google.maps.ImageMapType( getTileUrl: (coord, zoom) -> "http://b.tile.cloudmade.com/a97cc0871d97477b911c3f9155a93ee7/26250/256/#{zoom

google maps iOS SDK: custom icons to be used as markers

帅比萌擦擦* 提交于 2019-11-26 14:15:41
问题 The Android API has a very convenient class for this, IconGenerator. Using the IconGenerator in my Android app , I can easily make a marker that: is a simple rectangle with the color of my choosing. resizes to hold text of any length. is NOT an info window - I'd like the marker itself to contain the text as shown in the image below from the android version. // Android - problem solved with IconGenerator IconGenerator iconGenerator = new IconGenerator(context); iconGenerator.setStyle

Using Icon Fonts as Markers in Google Maps V3

若如初见. 提交于 2019-11-26 12:23:09
问题 I was wondering whether it is possible to use icon font icons (e.g. Font Awesome) as markers in Google Maps V3 to replace the default marker. To show/insert them in a HTML or PHP document the code for the marker would be: <i class=\"icon-map-marker\"></i> 回答1: Here's my attempt at the same thing (using "markerwithlabel" utility library) before I realised Nathan did the same more elegantly above: http://jsfiddle.net/f3xchecf/ function initialize() { var myLatLng = new google.maps.LatLng( 50,

Google Maps API Multiple Markers with Infowindows

旧时模样 提交于 2019-11-26 11:48:48
问题 I am trying to add multiple markers each with its own infowindow that comes up when clicked on. I am having trouble with getting the infowindows coming up, when I try it either shows up only one marker without an infowindow. Thanks, let me know if you need some more information <meta name=\"viewport\" content=\"initial-scale=1.0, user-scalable=no\"/> <style type=\"text/css\"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type=

Android Maps Utils Clustering show InfoWindow

余生长醉 提交于 2019-11-26 11:07:59
问题 I am planning to use the google maps marker clustering available in the utils library, but the google example app only shows marker clusters without any infoWindow. I am wondering now, am I not able to show a InfoWindow? I want the InfoWindow to be displayed on the marker like with a normal google maps marker, not on the cluster. The code I have: (From the google example) public class BigClusteringDemoActivity extends FragmentActivity { private ClusterManager<MyItem> mClusterManager; private

Display toolbar for Google Maps marker automatically

夙愿已清 提交于 2019-11-26 10:35:51
问题 I have a marker and when I open the map it shows the marker. When I click on it it shows the title and a toolbar which includes two buttons on the bottom right of the map which let me launch intents to navigate to the marker or show it in google maps. I would like to have these displayed automatically when the map is opened rather than having the user to click on the marker. Like this :-) ... I can\'t seem to work out how to do this. I have tried: // create marker MarkerOptions marker = new

Is it possible to write custom text on Google Maps API v3?

百般思念 提交于 2019-11-26 10:33:18
问题 Is it possible to write a custom text on Google Maps API v3 next to the marker, or I can use only the info window to do that? 回答1: To show custom text you need to create a custom overlay. Below is an example adapted from official Google documentation. You could also use this library for more "stylish" info windows <html> <head> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"> </script> <script> //adapded from this example http://code.google.com/apis/maps

Change marker size in Google maps V3

微笑、不失礼 提交于 2019-11-26 10:32:43
问题 I am using this explanation of how to color a google maps marker by setting the icon using a MarkerImage, and the coloring works well. But I can\'t make the scaledSize argument change the size of the marker. var pinColor = \'FFFF00\'; var pinIcon = new google.maps.MarkerImage( \"http://chart.apis.google.com/chart?chst=d_map_pin_letter&chld=%E2%80%A2|\" + pinColor, new google.maps.Size(21, 34), new google.maps.Point(0,0), new google.maps.Point(10, 34), new google.maps.Size(2, 4)); marker

Selecting last element in JavaScript array [duplicate]

寵の児 提交于 2019-11-26 07:51:38
问题 This question already has an answer here: Get the last item in an array 47 answers I\'m making an application that updates a user\'s location and path in real time and displays this on a Google Map. I have functionality that allows multiple users to be tracked at the same time using an object, which is updated every second. Right now, when a user pressed a button in the Android app, the coordinates are sent to a database and each time the location changes, a marker is updated on the map (and

How to get screen coordinates from marker in google maps v2 android

岁酱吖の 提交于 2019-11-26 05:27:32
问题 I have a small android problem (google maps v2 api) This is my code: GoogleMaps mMap; Marker marker = mMap.addMarker(new MarkerOptions().position(new LatLng(20, 20))); I am trying to find a way to get the current screen coordinates (x,y) for this marker object. Perhaps someone has an idea? I tried getProjection but it does not see to work. Thanks! :) 回答1: Yes, use Projection class. More specifically: Get Projection of the map: Projection projection = map.getProjection(); Get location of your