Skip to content

Load custom .geoson file with ngx-openlayers #203

@mfarisakmar

Description

@mfarisakmar

Hi,

May i know how could i load my custom .geojson file with this library?

below is my code in html. do i need to do anuything with the .ts file?

<div>
  <aol-map #map1 [width]="mapWidth" [height]="mapHeight">
      <aol-layer-tile>
          <aol-source-xyz></aol-source-xyz>
      </aol-layer-tile>
      <aol-layer-vector [visible]="'true'">
          <aol-source-geojson
              [url]="'geojson-service/map.geojson'"
              [featureProjection]="'EPSG:4326'">
          </aol-source-geojson>
          <aol-style>
              <aol-style-icon [src]="'assets/marker.svg'" [scale]="scale"
              [anchorOrigin]="'bottom-left'" [anchor]="[0.5, 0]"></aol-style-icon>
          </aol-style>
      </aol-layer-vector>
  </aol-map>
</div>

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions