Skip to content

[Feature request] Add attr to the Map component for OFormComponent #26

@dr-mohamed-benkhalifa

Description

@dr-mohamed-benkhalifa

I'm submitting a

[X] Feature request

Expected behavior

The map component should be able to communicate with the Ontimize Form Component (OFormComponent) via the attr attribute.

What is the motivation / use case for changing the behavior?

This feature is very useful when have a Ontimize form (o-form) and Ontimize map (o-map).
The idea is to add an attribute to OMapComponent 'attr', then the form component should use the map attr to communicate:

  • Update/Insert case: the form will get the value of the map current layers as a GeoJSON object, the map component should have a value variable that gets all current layers shown on the map. Leaflet has its functions to get the GeoJSON value of a layer: Marker, Polygon, CircleMarker, LayerGroup
  • Delete case: the form will set the geometry value as null of the map attr
  • Query case: the form should be able to set the map layers from GeoJSON object using the MapService method addGeoJson()

Environment


Angular version: 4.3.6
ontimize-web-ngx-map version: 2.0.2
ontimize-web-ngx version: 2.1.0-rc.1

Browser:
- [X] Chrome

For Tooling issues:
- Node version: v6.11.0
- Platform:  Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions