FAQ Database Discussion Community


Add a marker to a dynamic Google Map

android,google-maps,google-play-services,marker,supportmapfragment
I am develoeping an app that shows a map with specified LatLng values. The map fragment is dynamic (Not R.id.map) When i'm trying to add a marker to the specified location (That i'm getting from Google Places API JSON request) i'm getting a null pointer exepction. this is the code:...

How to get click event of marker using MapBox SDK?

android,mapbox,marker,clicklistener
I am using MapBox SDK for offline map I have added multiple markers on map, how to get click event for markers. Is there any way to get click event of marker?

HTML5, geolocation in real time with marker

javascript,html5,google-maps-api-3,marker
I have this code: function startTracking() { var trackId = navigator.geolocation.watchPosition(successCallback, null, {maximumAge:1000, timeout:60000, enableHighAccuracy:true}); function successCallback(position){ map.panTo(new google.maps.LatLng(position.coords.latitude, position.coords.longitude)); var marker = new google.maps.Marker({ position: new google.maps.LatLng(position.coords.latitude, position.coords.longitude), map: map, title: 'Posizione Attuale' }); marker.setMap(map); }; } Now the app create a marker every time that I move. I...

How to manage Markers well using google maps api v2 on android

android,google-maps,google-maps-markers,marker,markers
I'm trying to implement app in which you can add your own marker which will be given a shutdown time. To do so I need to know how to manage my markers. Let's say I have array list of users with assigned unique ID. private ArrayList<User> userList = new ArrayList<>();...

How to set the marker color when using geojson.Feature

colors,geojson,marker
I am using python and my code is like: from geojson import Feature, FeatureCollection import json import sys, pymongo db = pymongo.MongoClient(host = '..........').database coll_name = sys.argv[1] point_list = [] citymap_cursor = db[coll_name].find() for doc in citymap_cursor: point_list.append(Feature(geometry=doc['point_latlng'])) with open('/path to/%s.json' % coll_name, 'w+') as outfile: json.dump(FeatureCollection(point_list), outfile) By this...

MATLAB quickie: How to plot markers on a freqs plot?

matlab,marker
I haven't used MATLAB in a while and I am stuck on a small detail. I would really appreciate it if someone could help me out! So I am trying to plot a transfer function using a specific function called freqs but I can't figure out how I can label...

google maps marker array?

android,maps,marker
Hi guys and girls if any :)) this piece of code creates a null pointer exception I would like to put a couple of markers in MO LAT = Double.parseDouble(PartA); LNG = Double.parseDouble(PartB); LatLng Standort = new LatLng(LAT, LNG); MO[y] = mMap.addMarker(new MarkerOptions() .position(Standort) .icon(BitmapDescriptorFactory.fromResource(R.drawable.kreis))); builder.include(MO[y].getPosition()); Array type expected -...

Map shows multiple markers (overlays)

android,maps,openstreetmap,marker,osmdroid
I'm using osmdroid API for maps in my project. Below is the code I wrote to put an overlay(marker) on selected location. If I click on map to select any location, it puts an overlay there, but if I tap on map again to select any new location, it shows...

Scatterplot with different size, marker, and color from pandas dataframe

python,scatter-plot,marker,colorbar
I am trying to do a scatter plot with speed over meters for each point where marker indicate different types, size indicate different weights and color indicate how old a point is over 10 minutes scale. However, I was only able to plot by size so far. Any help is...

google Map click marker by external link

jquery,html,google-maps,geolocation,marker
I have google map API with marker. in click marker map zooms and pop up comes. find fiddle demo google.maps.event.addListener(marker, 'click', (function(marker, i) { return function() { infowindow.setContent(locations[i][0]); infowindow.open(map, marker); map.setZoom(9); map.setCenter(marker.getPosition()); } })(marker, i)); But I want to click this markers by external. function triggerClick(i) { google.maps.event.trigger(markers[i],'click'); } <ul...

Change Google Map marker color with external jQuery

jquery,google-maps,google-maps-api-3,google-maps-markers,marker
I'm using this function to draw the marker: function pinSymbol(color) { return { path: 'M31.5,0C14.1,0,0,14,0,31.2C0,53.1,31.5,80,31.5,80S63,52.3,63,31.2C63,14,48.9,0,31.5,0z M31.5,52.3 c-11.8,0-21.4-9.5-21.4-21.2c0-11.7,9.6-21.2,21.4-21.2s21.4,9.5,21.4,21.2C52.9,42.8,43.3,52.3,31.5,52.3z', fillColor: color, fillOpacity: 1, strokeColor: '#000', strokeWeight: 0, scale: 1, }; } and this is my marker: var marker = new google.maps.Marker({ position: map.getCenter(), icon: pinSymbol("#fff"), //defined marker color labelText: 'HERE WE ARE',...

angularjs google maps - markers with window - infowindow not showing

angularjs,infowindow,marker,angular-google-maps
Trying to get a app using angular-google-maps with: - multiple markers via the markers directive - a single infowindow via the window directive I've been through the API and multiple closed issues / questions on the git-hub site but just can't get it working... :-/ jsfiddle For simplicity, I'm declaring...

Touch listener on Google Map Markers Android

android,google-maps,google-maps-api-2,ontouchlistener,marker
How can I add a Tab/Touch/Click listener on the Markers I have on my Google Map in android program. For example in the below image I have one marker on google maps and when clicked, I want to bring up a toast saying this has been clicked http://i.stack.imgur.com/Bc7Lp.png I have...

google api v3 infowindow with multiple markers doesn't work

google-maps-api-3,infowindow,marker
I'm trying to write on the infowindow content, the record number of my loop. The result is that i read the last record number (10) for each infowindow, and not 1,2,3...10 Someone can help me? Thanks in advance The code is this: function generaMappaMulti() { var CoordinataIniziale = new google.maps.LatLng(44.714957,...

Google Map api v2 Marker not moving until I rotate the phone and the map “refreshes”

java,android,google-maps,location,marker
I have the following code : public class MapsActivity extends FragmentActivity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, LocationListener { private GoogleMap mMap; // Might be null if Google Play services APK is not available. // LogCat tag private static final String TAG = MapsActivity.class.getSimpleName(); private final static int PLAY_SERVICES_RESOLUTION_REQUEST = 1000; private Location...

How to hide “Navigation” and “GPS Pointer” buttons when I click the marker on the android google map

android,google-maps-api-2,marker
When I click the marker on the google map, "Navigation" and "GPS Pointer" buttons come out.How can I hide those two buttons programatically in android development? ...

marker.setVisible(false) and marker.setMap(null) not working on all markes

javascript,asp.net-mvc,google-maps,marker
I'am trying to change the markers while changing the zooming level in Google maps. When the page is loaded there will be 6 markers(for regions) created on Google maps and pushed into an array, if the user zoomed in, the 6 markers will be deleted and replace with another markers(for...

GoogleMaps SVG marker fillColor

javascript,jquery,svg,icons,marker
I am currently trying to change the color of an existent marker. Here is my javascript code: $(".etablissement").mouseenter(function() { var currentMarker = oMarkers[$(this).data("type")+"-"+$(this).data("id")]; var currentIcon = currentMarker.getIcon(); currentIcon = currentIcon.url; var newIcon = { url: currentIcon, origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(30, 30), scaledSize:new google.maps.Size(40, 40), fillColor: '#1077aa', fillOpacity:...

How to tweak MapFragment (Android)

java,android,dictionary,fragment,marker
I have made a MapFragment which basically is GoogleMaps. This Fragment is called in an activity, through the fragmentManager and fragment transaction. I would like to tweak my Map now to add some markers and dynamic zoom aswell. I am a bit struggling with this at the moment. Maybe some...

Workaround for set rating in Google Maps

android,google-maps,parse.com,google-maps-markers,marker
I am trying to set the rating of a rating bar inside of a marker's content window, but whenever I try setting the rating from the class which contains the fragment, the rating doesn't change. I have tried inflating a view (see below code) but that doesn't work. Is there...

Google Map Marker Routing

android,google-maps,routes,marker,transit
i am new in Google Map API V2 and i would like to make a marker/direction pointer to route on the google map. If you don't get what i mean, please visit this link https://developers.google.com/maps/documentation/android/ and click on flat marker. The code there is not even full and i have...

Matlab - Using symbols in gscatter

colors,symbols,symbol,marker,scatter
Ok, so I'm trying to use gscatter to plot 8 different points in a figure. These 8 points are all different and thus I want to give them different symbols. I know that gscatter will automatically assign them different colors, but I also want to be able to use the...

Gmap.net marker removal

c#,sqlite,marker,gmap.net
I am using the GMap.NET code for maps and markers. Adding markers and doing anything with the map hasn't been the problem its removing a single marker from the map I am having issues with. I researched everywhere on Google to remove a marker from the map but removing a...

Google Maps api v2 android: How to Remove a single marker?

java,android,google-maps,marker
In my app i need to have 2 types of markers: the first ones need to stay on a location and the second ones need to move, right now I dont have the static markers yet but my app can show a marker moving if the location of the phone...

How to permanently change behavior of markers for app?

android,google-maps,marker
I want to make it so that when a user creates a marker in google maps, it is able to be double clicked (or held on or something) and bring up a new Activity. Right now I have it so that I create a marker on the map manually and...

How to change Markers with this icon to use Letters in Google Maps using Meteor?

google-maps,meteor,google-maps-markers,marker
I have markers with this icon but i want to use Letters like a,b,c etc.The icon and Markers code as shown below: Js Code : var icon = { path: "M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0", fillColor: '#FF0000', strokeWeight: 1, fillOpacity: 1, anchor: new google.maps.Point(0,0), scale: .35 } for(var...