1

hello guys i have replaced my GoggleMaps in my application due to its lack of closing map and so clearing heap on demand, and now im using nutiteq instead, and im trying to reach google map's tiles . as the nutiteq has explained it uses parameters likes this :

"http://otile1.mqcdn.com/tiles/1.0.0/osm/{zoom}/{x}/{y}.png"

and the request will be like this :

 "http://otile1.mqcdn.com/tiles/1.0.0/osm/3/5/1.png"

but the google's parameters is like this:

https://maps.googleapis.com/maps/api/staticmap?center=x,y&zoom=z&size=400x400

but the request needs a double coordinate some thing like this :

https://maps.googleapis.com/maps/api/staticmap?center=42.05123,-70.31234&zoom=1&
size=400x400

any one who familiar with nutiteq, can please explain how can i make it to use double coordinates instead single integer at the request? thanks alot

Reza
  • 151
  • 1
  • 9

1 Answers1

1

You should create own custom DataSource, where you calculate tile center coordinates from x/y/zoom (see code samples here) and make Google Static map request based on this.

There are two questions still:

  • technical: matching of tiles can be inaccurate and Google logo will be in each tile
  • legal: according to my understanding it is violation of Google Maps terms of service. Last time when I checekd they allow to use Static maps only in web page, not in native mobile app. If you are sure you can use it (or ignore the legal issue), then why not to use their tiles ?
JaakL
  • 4,107
  • 5
  • 24
  • 37
  • thanks for that and for your awesome java star solutions, but i already found a source which works fine with it , any way i have noticed that while there is a network connection, nutiteq tries to get the tile online,not from cached tiles, is there any way to reverse this – Reza Nov 02 '14 at 12:29