Add an Image from url into custom InfoWindow google maps v2

I’ve been building a similar app. First of all, the reason your InfoWindow is not showing the downloaded image is because the MapFragment renders the view into a Canvas, and then draws that. What you’re seeing in the info window aren’t the views you created, but a “picture” or “screenshot” of them. You basically need … Read more

AngularJS ng-include inside of Google Maps InfoWindow?

After you add the content to the DOM, you’ll need to find it (maybe with a jQquery selector?), then $compile() it and apply it to the appropriate scope. This will cause Angular to parse your content and act on any directives it finds (like ng-include). E.g., $compile(foundElement)(scope) Without more code, it is difficult to give … Read more

Dynamic contents in Maps V2 InfoWindow

You should be doing Marker.showInfoWindow() on marker that is currently showing info window when you receive model update. So you need to do 3 things: create model and not put all the downloading into InfoWindowAdapter save reference to Marker (call it markerShowingInfoWindow) from getInfoContents(Marker marker) when model notifies you of download complete call if (markerShowingInfoWindow … Read more

Android Maps Utils Clustering show InfoWindow

Here is a simplified and slightly modified solution based on this answer. Note that the linked answer implements an InfoWindow for both Markers and Clusters. This solution only implements InfoWindows for Markers. It’s similar to how you would implement a custom InfoWindowAdapter for normal Markers with no Clustering, but with the additional requirement that you … Read more

Trigger event with infoWindow or InfoBox on click Google Map API V3

Ok I figured this out for infoWindow, but then I also figured it out for InfoBox since it is prettier and more customizable. I’m new to JavaScript and these closures can be very tricky. For infoWindow <!doctype html> <html lang=”en”> <head> <title>jQuery mobile with Google maps – Google maps jQuery plugin</title> <link rel=”stylesheet” href=”http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css” /> … Read more

custom info window adapter with custom data in map v2

Try this windowlayout.xml <?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:orientation=”vertical”> <TextView android:id=”@+id/tv_lat” android:layout_width=”wrap_content” android:layout_height=”wrap_content” /> <TextView android:id=”@+id/tv_lng” android:layout_width=”wrap_content” android:layout_height=”wrap_content” /> </LinearLayout> MainActivity.java public class MainActivity extends FragmentActivity { GoogleMap googleMap; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Getting reference to the SupportMapFragment of activity_main.xml SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); // Getting GoogleMap … Read more