Saturday, February 2, 2013

Re: GWT Maps V3 Api, clearing directions

i've got the same issue:
added gwt-maps-api-3.9.0-build-17.jar
added gwt-ajaxloader.jar

added the <inherits name='com.google.gwt.maps.Maps' /> in my project.gwt.xml 

in this line: LatLng center = LatLng.newInstance(49.496675, -102.65625);

when i debug my web app i get the error: $wnd.google is undefined 

pls help.

El miércoles, 28 de noviembre de 2012 03:08:01 UTC-3, Brandon Donnelson escribió:
The library isn't loaded when this shows up. 

Have a good day,
Brandon Donnelson


On Tue, Nov 27, 2012 at 9:24 PM, chris herbert <cherb...@gmail.com> wrote:
did you get the issue with $wnd.google is undefined resolved?


On Thursday, September 20, 2012 9:56:28 AM UTC-7, Deepak Singh wrote:
Any guidance pls..

On Thu, Sep 20, 2012 at 1:39 AM, Deepak Singh <deepaks...@gmail.com> wrote:
Could not resolve the exception mentioned.

Then i copied PlaceSearchMapWidget.java and tried to use.

But could not create the widget as 
    PlacesService placeService = PlacesService.newInstance(attrContainer, mapWidget);
And i could not understand 'attrContainer' parameter.


My requirement is simple,

I have latitude and longitude. I need to search places within 2 kms area of this latlong.

Pls let me know which kind of class will be useful for me ?

Regards
Deepak


On Thu, Sep 20, 2012 at 1:36 AM, Deepak Singh <deepaks...@gmail.com> wrote:
Now, I added gwt-ajaxloader.jar
It was able to run in dev mode.

Now i run the following code

MapOptions mo = MapOptions.newInstance();
LatLng ll = LatLng.newInstance(Double.parseDouble(latitude), Double.parseDouble(longitude));
mo.setCenter(ll);
mo.setZoom(4);
mo.setMapTypeId(MapTypeId.HYBRID);
MapWidget mw = new MapWidget(mo);
// enquiryDiv.appendChild(mw.getElement());


com.google.gwt.core.client.JavaScriptException: (TypeError) @com.google.gwt.core.client.impl.Impl::apply(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)([JavaScript object(6222), JavaScript object(6221), JavaScript object(6296)]): $wnd.google is undefined




On Thu, Sep 20, 2012 at 1:02 AM, Deepak Singh <deepaks...@gmail.com> wrote:
I added jar file APIs_Google_map3.8.0beta.jar to my classpath.
Added this to lib also.

Included 
<inherits name='com.google.gwt.maps.Apis_Google_Maps' /> to my *.gwt.xml

When i run the app in local, i get the following exception

Unable to find 'com/google/gwt/ajaxloader/AjaxLoader.gwt.xml' on your classpath;

Thanks
Deepak


On Wed, Sep 19, 2012 at 11:00 AM, Brandon Donnelson <branfl...@gmail.com> wrote:
Are you looking for the PlaceServiceSearchRequest? If so, I added and example map in the live demo maps. 


Brandon

On Tuesday, September 4, 2012 7:16:38 AM UTC-7, Deepak Singh wrote:
I want to use this library.

I have lattitude and longitude with me and i need to show the location on the map.
Also, need to find the nearest locations based on lattitue/longitude.

I went through the docs but could not understand the right class to be used.

Can you give me some sample code ?

Thanks
Deepak

On Fri, Aug 31, 2012 at 6:52 PM, Thai Ha Duong <duong...@gmail.com> wrote:
I have the same question please any one can help?


On Friday, 31 August 2012 12:47:02 UTC+1, Jonas wrote:
I'm using the GWT Maps V3 Api from https://github.com/branflake2267/GWT-Maps-V3-Api

After finding directions on the map, I'm trying to clear the previous ones before finding new.

In DirectionsRenderer:

  /**
   * This method specifies the map on which directions will be rendered. Pass null to remove the directions from the map.
   * @param mapWidget
   */
  public final void setMap(MapWidget mapWidget) {
    setMapImpl(mapWidget.getJso());
  }

  private final native void setMapImpl(MapImpl map) /*-{
    this.setMap(map);
  }-*/;

I'm trying to pass:

directionsDisplay.setMap(null);

which results in NPE:

Caused by: java.lang.NullPointerException: null
    at com.google.gwt.maps.client.services.DirectionsRenderer$.setMap$(DirectionsRenderer.java:50)

Anyone used this API and knows how to clear directions from the map widget?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/emLbrk1GnloJ.

To post to this group, send email to google-we...@googlegroups.com.

To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Deepak Singh

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/r8sXg55osSoJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
Deepak Singh



--
Deepak Singh



--
Deepak Singh



--
Deepak Singh

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/YC42P9rL5bkJ.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment