marker

Android Custom marker icon

不问归期 提交于 2019-11-28 10:45:52
I'm working on application with Google maps so i want to define a custom marker for each custom place, For example (gas station- Hotel- Hospital.. ) ! i have a overlays class with the latitude and longitude of many places and i want just how to give a custom icon! With the new Maps Api Setting the Icon for a Marker is done with the following Code: MarkerOptions markerOptions = new MarkerOptions().icon(BitmapDescriptorFactory.fromResource(R.drawable.icon_location)); The icon can not be changed after a Marker was created. To change an icon remove the marker and readd it with a new image. with

Google Maps API v3 adding multiple markers w/ info windows w/ custom text

谁说我不能喝 提交于 2019-11-28 08:05:40
问题 I am making a website over cyclists killed in Norway. For my project I have been using google maps api v3, but I have vague familiarity with javascript. You can see my result so far here: http://salamatstudios.com/googlemapstest/ Basicly I want to have multiple markers with infowindows on each one. Each one of the infowindows will contain: Name (age), Location, Date of death, Read more (which will be linked to a page on the website itself). Like this example here: http://salamatstudios.com

zoom to fit all markers on map google maps v2

淺唱寂寞╮ 提交于 2019-11-28 06:56:58
I want to set the map zoom level to fit all markers on the map. I have used following method as said by many people, but it is not working for me. It is displaying some other point. if (positions.size() > 0) { final LatLngBounds.Builder builder = new LatLngBounds.Builder(); for (Marker m : positions) { builder.include(m.getPosition()); } builder.include(positions.get(i).getPosition()); } try { googleMap.setOnCameraChangeListener(new OnCameraChangeListener() { @Override public void onCameraChange(CameraPosition arg0) { googleMap.moveCamera(CameraUpdateFactory.newLatLngBounds( builder.build(),

show info window on every marker at a time

久未见 提交于 2019-11-28 06:51:16
I want to show something like I am able to show all the markers on the map but I want to show info window on every markers whenever all the markers are populated. I've tried this so far but it shows all the markers with only one markers info window. for (int i = 0; i < jobsDtoList.size(); i++) { Double latitude = Double.parseDouble(jobsDtoList.get(i).getSiteLatitude()); Double longitude = Double.parseDouble(jobsDtoList.get(i).getSiteLongitude()); LatLng latLng = new LatLng(latitude, longitude); MarkerOptions TP = new MarkerOptions().position(latLng).icon(BitmapDescriptorFactory.fromResource(R

Add a marker to an image in javascript?

♀尐吖头ヾ 提交于 2019-11-28 06:35:34
Anyone know how I can add a marker to an image (not a map) in Javascript? Ideally I'd like a handler that behaves much like adding a marker to a map - i.e. onclick causes a marker to be displayed at the point that was clicked, and returns the x/y pixel coordinates of the point that was clicked. Is this possible? Cheers Richard Yes, it is possible. Although it's totally doable with just javascript, I would use some kind of library like JQuery . The approach would be to have an img-element with your marker, and then add a click -handler to the image you want to use as your "map" which moves your

move marker on google maps api 2

可紊 提交于 2019-11-28 05:05:45
How do I move marker on Google maps api V2 ? I am using below code but it does not move marker on the map. What am I doing wrong here ? This should work when location changes, so I have added onLocationChanged method and in that, am getting location details and trying to move marker on new details, but this doesn't work. Here is my code: import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesUtil; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.model

Rotate marker as per user direction on Google Maps V2 Android

点点圈 提交于 2019-11-28 04:45:37
I want to rotate marker as per bearing or sensor value received from Accelerometer to show the user where actually he is moving. I have set marker icon and flat value to true but its not working as required. mCurrentLocationMarker.position(new LatLng( LocationUtils.sLatitude, LocationUtils.sLongitude)); mCurrentLocationMarker.icon(icon); mCurrentLocationMarker.flat(true); mCurrentLocationMarker.rotation(LocationUtils.sBearing); if (currentMarker != null) { currentMarker.setPosition(new LatLng( LocationUtils.sLatitude, LocationUtils.sLongitude)); } else { currentMarker = mGoogleMap .addMarker

get other values from marker

馋奶兔 提交于 2019-11-28 04:01:51
问题 I'm stuck with this problem and I hope someone can lead me to a solution, I have spent 3 days on it until now.. The Problem I have 2 activities, activity A is a listview populated from a JSON list. Activity B is Google maps v2 based with the same json list but its on Map not on list. on activity A list there is onItemclicklistener and when I click on it shows another activity and its works fine. no problem here. everything works like is supposed too. on Activity B there is map fragment, and

Changing marker style in scatter plot according to third variable

℡╲_俬逩灬. 提交于 2019-11-28 02:48:42
问题 I am dealing with a multi-column dictionary. I want to plot two columns and subsequently change color and style of the markers according to a third and fourth column. I struggle with changing the marker style in the pylab scatter plot. My approach, which works for color, unfortunately does not work for marker style. x=[1,2,3,4,5,6] y=[1,3,4,5,6,7] m=['k','l','l','k','j','l'] for i in xrange(len(m)): m[i]=m[i].replace('j','o') m[i]=m[i].replace('k','x') m[i]=m[i].replace('l','+') plt.scatter(x

Multiple markers and infowindows on Google Maps (using MySQL)

给你一囗甜甜゛ 提交于 2019-11-28 02:23:46
There are another four if statements which do the same thing for other categories. <?php if (isset($_POST['one'])) { $query = "SELECT * FROM beerstable WHERE category LIKE \"%Lager%\""; $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); } while ($row = mysql_fetch_assoc($result)) { $lat = $row['lat']; $lng = $row['lng']; $markername = $row['name']; $link = $row['link']; $photo = $row['photo']; ?> var infowindow = new google.maps.InfoWindow({ content: '<h1><?php echo $markername ?></h1><br><img src="<?php echo $photo ?>" height="30" width="50"><br><a href="<