# Map Component Positioning Revisited

DevFeed: [Map Component Positioning Revisited](<https://devfeed.tech/articles/map-component-positioning-revisited-19359.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/map-component-positioning-revisited/>)

Author: Shai Almog

Published: 2018-04-09T00:00:00Z

Content type: release

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [components](<https://devfeed.tech/tags/components.md>), [map](<https://devfeed.tech/tags/map.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

A new MapContainer API places components directly within a map and updates their positions during panning and zooming. It temporarily renders components as images to avoid positioning delays, then restores component rendering when movement ends.

## Source excerpt

I published two articles on MapLayout here and here. After all that work they are now effectively obsolete thanks to a new API in MapContainer that builds component placement directly into the map itself. Unfortunately the Google API doesn't let us position components (native or otherwise) accurately as it pans the map. This creates a small delay when panning/zooming as the components try to catch up to the map. The only workaround is to convert the components to images and ask the map to move images within it. Then convert the images back when the map finishes panning. That's exactly what Steve implemented within the native maps.