google-maps-markers

how to change marker image in a google map

狂风中的少年 提交于 2019-12-02 13:39:44
i'm showing 20 markers in the map from that i need to show 10 markers with one icon and other 10 markers want to show in other icon. markers myLatLng to myLatLng9 should have similar marker and markers myLatLngb to myLatLngb9 should have same marker. can u help me what to change so that i can differentiate the 2 markers and label also markers - myLatLng to myLatLng9 as A and myLatLngb to myLatLngb9 as B. js fiddle - https://jsfiddle.net/9yq8y1p2/4/ code <script> function initMap() { var labels = '0123456789'; var labelIndex = 0; // @Model.AssetTrackers[0].deviceid @: var myLatLng = { lat:

How to plot city in map via boundary line? [closed]

余生颓废 提交于 2019-12-02 13:24:39
How can I plot boundary line on G-Map on the basis of city searched like in this image red line showing searched city map? I have see various links but unable to find a solution. Thanks Currently Google Maps JavaScript API doesn't expose any boundaries of geographic features. There is very old feature request in the public issue tracker to add this functionality, however it looks like Google didn't set high priority on this task: https://issuetracker.google.com/issues/35816953 Feel free to star the public feature request to express your interest and subscribe to notifications. Also, you can

How to Find list of latitude and longitude using pincode as input

柔情痞子 提交于 2019-12-02 13:21:59
is there any way we can we find list of latitude and longitude using zip/pincode? Input: 560103 Output : 12.123456, 72.123456 12.123654, 72.366666 .... .... 12.123456, 72.123456 on google maps, list of lat-long polygon display would be like below map.. Note: Output is just for references, its not correct. Checkout Google Api Check this out http://maps.googleapis.com/maps/api/geocode/json?address=110029&sensor=true This will give you the approx location of pincode 110029 All you have to do is parse the json end extract the coordinates u have to install pyzipcode from https://pypi.python.org

Google Maps Android API v2 - Add a marker failed

拈花ヽ惹草 提交于 2019-12-02 13:06:32
问题 I found a solution . The map may not have been initialized yet, try getMap() in a later point of the lifecycle, like onResume() My code is protected void onResume() { super.onResume(); int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()); if (resultCode == ConnectionResult.SUCCESS){ Toast.makeText(getApplicationContext(), "isGooglePlayServicesAvailable SUCCESS", Toast.LENGTH_LONG).show(); if(gMap == null){ gMap = mMapView.getMap(); if(gMap != null){

Getting current location in google map and pass it to a variable in javascript

萝らか妹 提交于 2019-12-02 13:00:51
I want to display a direction in google map from current location to a known location. my code is shown below: <script> var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var map; function initialize() { directionsDisplay = new google.maps.DirectionsRenderer(); var bne = new google.maps.LatLng(-27.572832, 153.065247); var mapOptions = { zoom:7, center: bne } map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); directionsDisplay.setMap(map); } function calcRoute() { navigator.geolocation.getCurrentPosition( function (pos) { var start =

googleMap marker rotation position changes

孤者浪人 提交于 2019-12-02 12:41:59
I am using overlay as marker, and here is my below code which I created. <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>Label Overlay Example</title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> function initialize() { var latLng = new google.maps.LatLng(40, -100) , map = new google.maps.Map(document.getElementById('map_canvas'), { zoom: 15, center: latLng, mapTypeId: google.maps.MapTypeId.ROADMAP }) , goldStar = { path: 'M57.996 -29.483q0 1.836 -1.332 3.24l-2.7 2.7q-1

Open URL from custom info window, Android Google Maps V2

廉价感情. 提交于 2019-12-02 12:25:26
I am using android google maps api v2 with many markers displayed on it. Each time you click on a marker a custom info window with specific tittle/snippet is open. The problem is that I cannot click on the URL "www.news.com". Please find below the options of my marker. How can I specify that the "www.news.com" is a HTML URL link inside the .snippet attribute, and when user clicking on it to open directly in mobiles explorer? mMap.addMarker(new MarkerOptions() .position(new LatLng(39.686286, 19.838443)) .title("HELLO") .snippet("Name: \nSurname: \nphone: XXX \nwebsite: www.news.com") .icon

actionbar search lower case is not working for snippet on addMarker

China☆狼群 提交于 2019-12-02 12:24:35
问题 I want to locate the marker geo points by searching through the snippet. The snippet is where the Plate no. I have one problem I can't search for any other Plate No. public class MainActivity extends BaseActivityLocation implements NavigationView.OnNavigationItemSelectedListener, SearchView.OnQueryTextListener, SearchView.OnSuggestionListener { @Override public boolean onQueryTextSubmit(String query) { for(Marker m : list) { if(m.getSnippet().toLowerCase().equals(query)) { mMapFragment

CursorIndexOutOfBoundsException problem:Index 4 requested, with a size of 4

不问归期 提交于 2019-12-02 12:16:37
问题 I want to display for each maker an AlertDialog that has some description, for that, i'm using this code: protected boolean onTap(int index) { db = openHelper.getWritableDatabase(); String[] result_columns = new String[] {COL_DESCRI}; Cursor cur = db.query(true, TABLE_COORD, result_columns, null, null, null, null, null, null); cur.moveToPosition(index); String description = cur.getString(cur.getColumnIndexOrThrow("description")); AlertDialog.Builder dialog = new AlertDialog.Builder(Geo.this);

Google Map from SQL Database

扶醉桌前 提交于 2019-12-02 10:44:50
问题 I have a set of coordinates in a database that I want to be used to add markers on a google map. How would I go about doing this? I have my code set up to look like: http://www.macrostash.com/2011/09/17/demo-use-a-php-mysql-database-to-load-markers-on-a-google-map/ and the database set up the same way. However the example isn't working well. I am fairly new to this so any help would be appreciated. Thanks 回答1: That's a good tutorial! I got it to work using sourcecode links from the broken