Note that there are some explanatory texts on larger screens.

plurals
  1. POLatLng is no longer working in the compiler
    text
    copied!<p>So I started working on getting my map up and running in my little application and as soon as I tried putting in camera moves and such I ran into a little snag. The compiler doesn't seem to like the <code>LatLng</code> class at all. It gives me this.</p> <pre><code>The method LatLng(double, double) is undefined for the type MyMapHandler </code></pre> <p>So I tried <code>ctrl+alt+o</code> and that didn't fix it, so I manually added the imports like so:</p> <pre><code>... import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.model.LatLng; </code></pre> <p>Doing that fixed the other issues I was getting with <code>map</code> classes, but it did not fix the <code>LatLng(double, double)</code> not working issue. I'm still getting the above error when I do this</p> <pre><code>public class MyMapHandler extends Activity implements ConnectionCallbacks, OnConnectionFailedListener, LocationListener { private GoogleMap mMap; private LocationClient mLocationClient; ... public void onResume() { super.onResume(); setUpMapIfNeeded(); setUpLocationClientIfNeeded(); mMap.animateCamera(CameraUpdateFactory.newLatLngZoom( LatLng(mLocationClient.getLastLocation().getLatitude(), mLocationClient.getLastLocation().getLongitude()), (float) 4)); } ... } </code></pre> <p>At this point, I'm not sure what's going on. After manually putting the import in, the context popups seem to work fine with the <code>LatLng</code> class, it even pulls up the <strong>JavaDocs</strong> with no problem. So I'm convinced the issue is with eclipse not my code. Although if you see something let me know. I tried searching both bing and google and didn't come up with anything useful. Just people saying "fix my code!!!" and obviously not getting a response.</p> <p>EDIT: It did work yesterday, so that's part of my confusion.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload