Zum Hauptinhalt gehen

Displaying feature data from multiple layers in one map tip?

Kommentare

1 Kommentar

  • John Nerge
    Short answer: Yes, with data links.

     

    Long answer:

     

    It depends on what exactly you're trying to display. For an example, let's say you have a parcel and want to display information about what districts it's in. You could create a one to one data link that uses a spatial query that looks something like:

     

    SELECT

     

    district1.name AS [District 1 Name],

     

    district2.name AS [District 2 Name]

     

    FROM

     

    parcels, district1, district2

     

    WHERE

     

    district1.shape.STContains(parcels.shape.STCentroid()) = 1

     

    district2.shape.STContains(parcels.shape.STCentroid()) = 1

     

    AND parcels.ID = @parcelID

     

    Then in your parcel map tip you'd add {DataLinkName.District 1 Name} and {DataLinkName.District 2 Name}.

     

    Alternative answer:

     

    Use the same query to create a spatial view and use it in your site instead because its faster than a data link. Faster yet would be to create a cut of the data with all of the district info pre-calculated. Here's a working example: https://gis.brooklynpark.org/neighborhoodinfo.
    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.