开发者

Google Map API, with my own created Map figure

开发者 https://www.devze.com 2023-01-19 13:14 出处:网络
In android, is it possible that I would create my own Map figure, and then use this Map with the gps location from Google Map API

In android, is it possible that I would create my own Map figure, and then use this Map with the gps location from Google Map API

Example, I draw a map for my own house, then apply Google Map API to be abl开发者_C百科e to make the location of each point in the map


Yes, I believe you can. A couple of options are as follows:

Draw your 'map figure' in an overlay - if the background is translucent, then you'll be able to see the Google map underneath.

Alternatively, use a dummy Google maps API key - in this case the MapView layer is rendered as a grey background but all the API calls appear to work. Again render your 'map figure' in the Overlay draw method.

In both cases, you'll have to ensure the map projection (scale, position, etc) match up with the coordinates of your 'map figure', especially if you scroll or zoom the map view.

It might be best going with the first option, initially, then you'll have a visual confirmation if you're code is correct.

0

精彩评论

暂无评论...
验证码 换一张
取 消