Code Monkey home page Code Monkey logo

Comments (7)

Ctrl-X avatar Ctrl-X commented on August 17, 2024

I have the same need! Please help!

from gwt-maps-v3-api.

gbougiakas avatar gbougiakas commented on August 17, 2024

Unfortunately, I don't think that's possible.

This project uses Google loader to load the Maps APIs from Google (https://developers.google.com/loader/) which does not official supports Maps (http://stackoverflow.com/questions/5296115/can-you-load-google-maps-api-v3-via-google-ajax-api-loader)

I think the only way to get Chinese maps is by using the new API

<script type="text/javascript" src="http://maps.google.cn/maps?file=api&v=2&key=abcdefg&sensor=true"> which is not used by this project (and I don't know if that can change). I don't even know how long google will support the loader API for their maps. It might stop alltogether at some point.

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on August 17, 2024

You'll have to load the api another way, instead of using the api. As long as the javascript you want gets injected you can use the wrapping api. Or patches are welcome.

from gwt-maps-v3-api.

gbougiakas avatar gbougiakas commented on August 17, 2024

Hello,

Can you please elaborate? I tried injecting the new API code and stopped using the old one (commented it out) and it won't work.

Regards

from gwt-maps-v3-api.

branflake2267 avatar branflake2267 commented on August 17, 2024

Hm, not sure what's going on. Either the api has diverged to much or the javascript isn't available before the api is called. Usually it happens to be the javascript isn't attached to the dom yet, and the api is called and you get an undefined.

from gwt-maps-v3-api.

gbougiakas avatar gbougiakas commented on August 17, 2024

The code in this library eventually calls this:

AjaxLoader.loadApi("maps", API_VERSION, onLoad, settings);

If I get this commented out, I get a blank pane instead of a map which is normal.

However, even if I inject my page with the latest official Google Maps API:

http://maps.google.com/maps/api/js?sensor=false

I can see the javascript loaded using my browser's inspector but I still get a blank pane instead of a map.

I reckon the new maps API uses different objects/JS names etc so the GWT lib won't pick them up.

I hope I am wrong but I think this is what the case is.

Thanks a lot for your time and for replying.

Regards,
George

from gwt-maps-v3-api.

gbougiakas avatar gbougiakas commented on August 17, 2024

Nothing I tried worked. Maybe the JS objects from the old API are completely different than the ones from the new one. I am attaching a screenshot of what the old one and the new one loads.

old:
https://www.dropbox.com/s/18ob51sg4yjsoni/Old.PNG?dl=0

new
https://www.dropbox.com/s/ow4s1tdpls6phqt/New.PNG?dl=0

from gwt-maps-v3-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.