-
Notifications
You must be signed in to change notification settings - Fork 10
Set MapmyIndia Style
MapmyIndia offers a range of preset styles to rendering the map. The user has to retrieve a list of styles for a specific account. The listing api would help in rendering specific style as well as facilitate the switching of style themes.
From the below reference code it would become quite clear that user has to specify style names and not URLs to use them. A default style is set for all account users to start with. To know more about available styles, kindly contact apisupport@mapmyindia.com
This feature is available from version v0.2.0
To get the list of available styles:
<MapmyIndiaGL.MapView
+ didLoadedMapmyIndiaMapsStyles={data => list of styles }
style={{flex: 1}}>
<MapmyIndiaGL.Camera
zoomLevel={4}
animationMode="moveTo"
centerCoordinate={DEFAULT_CENTER_COORDINATE}
/>
</MapmyIndiaGL.MapView>
MapmyIndiaStyle
contains below parameters:
-
description(String)
: Description of the style -
displayName(string)
: Generic Name of style mostly used in MapmyIndia content. -
imageUrl(String)
: Preview Image of style -
name(String)
: Name of style used to change the style.
To set MapmyIndiaMaps style reference code is below:
<MapmyIndiaGL.MapView
+ mapmyIndiaStyle={'styleName'}
style={{flex: 1}}>
<MapmyIndiaGL.Camera
zoomLevel={4}
animationMode="moveTo"
centerCoordinate={DEFAULT_CENTER_COORDINATE}
/>
</MapmyIndiaGL.MapView>
To enable/disable loading of last selected style:
MapmyIndiaGL.setShowLastSelectedStyle(true);
For any queries and support, please contact:
- Installation Guides
- Components
- Sources
- Layers
- Widgets
- Set MapmyIndia Style
- Rest Api's