google-maps-markers

JS Google Maps API v3 Animate Marker Between Coordinates

别等时光非礼了梦想. 提交于 2019-11-27 19:33:07
I have a simple javascript maps application that I'm working on that requires me to animate the movement of multiple markers between different coords. Each marker is free to move on its own and all markers are stored in an array list. However, I have been having trouble getting them to smoothly transition locations. I've done a ton of research and trial/error but no luck, anyone have any luck with this? Tina CG Hoehr My quick-and-dirty approach does not involve a ton of research :( Here's the demo: http://jsfiddle.net/yV6xv/4/ Click on a marker to begin moving it, after it stops, you can click

Adding Click Event on InfoWindow/Marker in Google Maps SDK for native iOS/objective C

半城伤御伤魂 提交于 2019-11-27 19:28:14
Simple Question I´m working on an App for iOS where I embedded the new Google Map for native iOS. Everything works fine except one problem where I can´t find a propper solution for native IOS/ Objective-C neither here nor at google (if there is one please show me and sorry for annoying you) What I want: I want the User to Click on the Marker that opens the Info Window. After If he clicks or taps on the Info Window it should open a New UIView with further Informations. How can I do that? Thanks for advices 1.conform to the GMSMapViewDelegate protocol. @interface YourViewController ()

Add Marker on Android Google Map via touch or tap

断了今生、忘了曾经 提交于 2019-11-27 19:24:46
I am a beginner in Android Developer. I want to develop a Map Application using Google Map. Now, I want to add marker on the map via Touch or Tap on the Map. I do not know how to apply touch event to drop the marker on the map. Please tell me and, if it is possible, please give me some links or examples. Thank you and sorry for my English. user3066085 This code is Successful run I am working on that code this code is for Dynamic Draw I think this code help you more for Static or dynamic both places you can use this code double latval = Double.parseDouble(jsonobject.getString("lat")); double

Adding multiple markers in Google Maps API v2 Android

北城余情 提交于 2019-11-27 18:24:53
I want to add multiple markers in my map, but I don't know the way. At the moment, im using this, and it works correctly: Marker m1 = googleMap.addMarker(new MarkerOptions() .position(new LatLng(38.609556, -1.139637)) .anchor(0.5f, 0.5f) .title("Title1") .snippet("Snippet1") .icon(BitmapDescriptorFactory.fromResource(R.drawable.logo1))); Marker m2 = googleMap.addMarker(new MarkerOptions() .position(new LatLng(40.4272414,-3.7020037)) .anchor(0.5f, 0.5f) .title("Title2") .snippet("Snippet2") .icon(BitmapDescriptorFactory.fromResource(R.drawable.logo2))); Marker m3 = googleMap.addMarker(new

Custom marker in google maps in android with vector asset icon

有些话、适合烂在心里 提交于 2019-11-27 17:58:19
How can we achieve a map marker icon with vector asset file, the way google shows it like this, programatically: Update: map.addMarker(new MarkerOptions() .position(latLng) .icon(BitmapDescriptorFactory.fromResource(R.drawable.your_vector_asset)) .title(title); this doesnot work when dealing with vector assets. The main reason to ask the question. The error with the above code: java.lang.IllegalArgumentException: Failed to decode image. The provided image must be a Bitmap. I was looking for exact same requirement, and seeing this question made me happy at first, but same as @Shuddh I wasn't

Google Maps API: open url by clicking on marker

半世苍凉 提交于 2019-11-27 17:23:31
I want to open a new window by clicking on a marker using Google Maps API 3. Unfortunately there are not many examples for the Google Maps API and I found out this code: google.maps.event.addListener(marker, 'click', function() { window.location.href = marker.url; }); How to use it, when I create markers with a loop? I tried it in many ways with no afford. This is my code – I made it simple and short: <!DOCTYPE html> <html> <head> <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 }

Using setZoom() after using fitBounds() with Google Maps API V3

╄→гoц情女王★ 提交于 2019-11-27 17:16:45
I'm using fitBounds() to set the zoom level on my map too include all the markers currently displayed. However, when I have only one marker visible, the zoom level is 100% (... which zoom level 20 I think...). However, I don't want it to be that far zoomed in so the user can adjust the position of the marker without having to zoom out. I have the following code: var marker = this.map.createMarker(view.latlng, this.markerNumber); this.map.bounds.extend(view.latlng); this.map.map.setCenter(this.map.bounds.getCenter()); this.map.map.fitBounds(this.map.bounds); if (this.markerNumber === 1) { this

Efficient Map Overlays in Android Google Map

穿精又带淫゛_ 提交于 2019-11-27 17:03:44
I want to do the following and am kind of stuck on these for a few days: I was trying to draw polylines (I have encoded polylines, but have managed to decode those) that move when I move the map . The only solution that I found was for Geopoints to be transformed into screen coordinates... which won't move if I move the map. I used HelloItemizedOverlay to add about 150 markers and it gets very very slow . Any idea what to do? I was thinking about threads (handler). I was looking for some sort of a timer function that executes a given function periodically , say, every 1 minute or so. I was

Animate the rotation of the Marker in google map v2

筅森魡賤 提交于 2019-11-27 16:55:43
问题 i am using google maps v2. i have a marker on map, this marker changes rotation every while. I want to animate the rotation of my maker to rotate smoothly. Can anyone help please 回答1: That's mine implementation of smooth marker movement with maker image rotation (when it's set to FLAT [important]). The marker is moved to the requested location smoothly plus it's rotated to the requested degree with a proper direction. For example, when moving from 5deg to 355deg it moves anticlockwise, when

Move all the markers on the map to their updated/new current location periodically as users moves

∥☆過路亽.° 提交于 2019-11-27 16:27:10
I'm developing an android app where some users opens the same activity from their devices. There is a map in this activity and as users opens this activity from their devices, their location coordinates is fetched from Firebase and a marker based on these coordinates is shown on the map. Here's my code: acceptingUserReference.child(requestID).child(key).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { if (dataSnapshot.getValue() != null) { final Map<String, String> newAcceptedUser = (Map<String, String>) dataSnapshot