Skip to content

Conversation

AE1NS
Copy link

@AE1NS AE1NS commented Jun 18, 2024

This PR adds support (first implementation scoped to geoJson) for map features.

Examples

addFeatures(type: FeatureType, data: any, idPropertyName: string, styles: FeatureStyles): string[]

await map.addFeatures(
    FeatureType.GeoJSON,
    {
        type: 'Feature',
        geometry: GeoJSONData,
        properties: {
            id: 'my-identifier',
        },
    },
    'id',
    {
        ['my-identifier']: {
            strokeColor: '#123456',
            strokeOpacity: 0.8,
            strokeWeight: 1,
            fillColor: '#654321',
            fillOpacity: 0.1,
            geodesic: true,
        }
    }
)

getFeatureBounds(featureId: string)

map.getFeatureBounds('my-identifier')

removeFeature(featureId: string)

map.removeFeature('my-identifier')

Closes #20

@AE1NS AE1NS changed the title feat(google-maps): Implemented map feature functions (i.e. GeoJSON support) feat: Implemented map feature functions (i.e. GeoJSON support) Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data layer support
2 participants