Securrency-OSS / mirai

Mirai is a Server-Driven UI (SDUI) library for Flutter. Mirai allows you to build beautiful cross-platform applications with JSON in real time.
https://pub.dev/packages/mirai
MIT License
490 stars 60 forks source link

feat: Implement Support for GoogleMap Widget in Mirai Library #238

Open ArjunBhilare opened 5 months ago

ArjunBhilare commented 5 months ago

Feature Request

Summary: Extend the Mirai library to include support for the GoogleMap widget, enabling dynamic rendering and control of maps in Server-Driven UI applications.

Details: Maps are a fundamental component in many mobile applications, used in scenarios ranging from location tracking to route planning. Integrating GoogleMap support into Mirai would empower developers to dynamically manipulate map properties, markers, and behaviors directly from the server, enhancing the interactivity and versatility of SDUI apps.

Proposed Implementation

JSON Schema for Map Properties: Define a comprehensive JSON structure to represent various GoogleMap properties like initial camera position, markers, polylines, polygons, and map type.

Dynamic Content Management: Allow updating map elements (like markers and polylines) in real-time based on server responses, enabling live tracking features or dynamic content presentation on maps.

Interaction Handlers: Implement support for map interaction events such as onMarkerTapped, onMapCreated, and onCameraMove, with corresponding actions defined in the JSON.

Custom Parser for Map Widget: Develop a custom parser in Mirai that translates the JSON map definitions into a GoogleMap widget, handling the instantiation and configuration of the map according to the server-defined properties.

Use Cases

Location-Based Services: For apps that need to display user or asset locations dynamically, like delivery apps or ride-sharing services.

Interactive Maps in Travel Apps: To dynamically update points of interest, routes, or informational overlays based on user preferences or travel itineraries.

Real Estate Applications: For displaying property listings with dynamic markers and information based on user search criteria. Impact

Adding GoogleMap support would significantly broaden the scope of applications that can be developed with the Mirai library, especially for location-based services and apps requiring high degrees of interactivity with map data. This feature aligns with the growing trend of providing rich, dynamic content in mobile applications.

mtellect commented 3 months ago

Feature Request

Summary: Extend the Mirai library to include support for the GoogleMap widget, enabling dynamic rendering and control of maps in Server-Driven UI applications.

Details: Maps are a fundamental component in many mobile applications, used in scenarios ranging from location tracking to route planning. Integrating GoogleMap support into Mirai would empower developers to dynamically manipulate map properties, markers, and behaviors directly from the server, enhancing the interactivity and versatility of SDUI apps.

Proposed Implementation

JSON Schema for Map Properties: Define a comprehensive JSON structure to represent various GoogleMap properties like initial camera position, markers, polylines, polygons, and map type.

Dynamic Content Management: Allow updating map elements (like markers and polylines) in real-time based on server responses, enabling live tracking features or dynamic content presentation on maps.

Interaction Handlers: Implement support for map interaction events such as onMarkerTapped, onMapCreated, and onCameraMove, with corresponding actions defined in the JSON.

Custom Parser for Map Widget: Develop a custom parser in Mirai that translates the JSON map definitions into a GoogleMap widget, handling the instantiation and configuration of the map according to the server-defined properties.

Use Cases

Location-Based Services: For apps that need to display user or asset locations dynamically, like delivery apps or ride-sharing services.

Interactive Maps in Travel Apps: To dynamically update points of interest, routes, or informational overlays based on user preferences or travel itineraries.

Real Estate Applications: For displaying property listings with dynamic markers and information based on user search criteria. Impact

Adding GoogleMap support would significantly broaden the scope of applications that can be developed with the Mirai library, especially for location-based services and apps requiring high degrees of interactivity with map data. This feature aligns with the growing trend of providing rich, dynamic content in mobile applications.

Feature Request

Summary: Extend the Mirai library to include support for the GoogleMap widget, enabling dynamic rendering and control of maps in Server-Driven UI applications.

Details: Maps are a fundamental component in many mobile applications, used in scenarios ranging from location tracking to route planning. Integrating GoogleMap support into Mirai would empower developers to dynamically manipulate map properties, markers, and behaviors directly from the server, enhancing the interactivity and versatility of SDUI apps.

Proposed Implementation

JSON Schema for Map Properties: Define a comprehensive JSON structure to represent various GoogleMap properties like initial camera position, markers, polylines, polygons, and map type.

Dynamic Content Management: Allow updating map elements (like markers and polylines) in real-time based on server responses, enabling live tracking features or dynamic content presentation on maps.

Interaction Handlers: Implement support for map interaction events such as onMarkerTapped, onMapCreated, and onCameraMove, with corresponding actions defined in the JSON.

Custom Parser for Map Widget: Develop a custom parser in Mirai that translates the JSON map definitions into a GoogleMap widget, handling the instantiation and configuration of the map according to the server-defined properties.

Use Cases

Location-Based Services: For apps that need to display user or asset locations dynamically, like delivery apps or ride-sharing services.

Interactive Maps in Travel Apps: To dynamically update points of interest, routes, or informational overlays based on user preferences or travel itineraries.

Real Estate Applications: For displaying property listings with dynamic markers and information based on user search criteria. Impact

Adding GoogleMap support would significantly broaden the scope of applications that can be developed with the Mirai library, especially for location-based services and apps requiring high degrees of interactivity with map data. This feature aligns with the growing trend of providing rich, dynamic content in mobile applications.

@divyanshub024 For the proposed feature stated to work, it will require some sort of state management to keep track the state of google map controller, is there a proposition to support a state management solution for the framework yet?

divyanshub024 commented 2 months ago

Hey @mtellect,

Yes, I am working on bringing the state management solution to Mirai. Please keep an eye on #280