Images received from poi are not displayed (cdn.mappedin)

Subject: Images from POI objects not loading - 404 errors with Content-Type: application/xml

Environment

  • Mappedin React Native SDK: v6.0.0-alpha.13

  • React Native: 0.73.6

  • Platform: iOS/Android

  • Map ID: 6874eba5f9567d000ba1a81f

Problem Description

We’re trying to display images from POI (Points of Interest) objects in our React Native app using Mappedin SDK. The images are stored in the images array of POI objects, with URLs pointing to cdn.mappedin.com.

Current Implementation

We’re extracting image URLs from POI objects like this:

// From POI object structure
const poi = {
  id: "s_a480f6445b665f32",
  name: "Paisagem Pastoral",
  images: [
    {
      __type: "image",
      id: "some_id",
      url: "https://cdn.mappedin.com/6874eba5f9567d000ba1a81f/7d1738f87c22b10ad6a5aa4277c6c333013035c0.webp"
    }
  ]
};

// We then use these URLs in React Native Image component
<Image source={{ uri: poi.images[0].url }} />

Expected Behavior

  • Images should load and display correctly in React Native Image components

  • URLs should return actual image data with proper Content-Type (image/webp, image/jpeg, etc.)

Actual Behavior

  • 404 errors when trying to load images

  • Server returns Content-Type: application/xml instead of image data

  • Images fail to load in React Native Image components

  • URLs appear to be valid but are not accessible

Error Details

LOG :cross_mark: RNImage load error: cdn.mappedin .com/6874eba5f9567d000ba1a81f/7d1738f87c22b10ad6a5aa4277c6c333013035c0.webp
LOG :cross_mark: Gallery image load error: {“error”: “Failed to load https ://cdn.mappedin.com/…”, “responseCode”: 404, “httpResponseHeaders”: {“Content-Type”: “application/xml”}}

Questions for Developers

  1. Are these CDN URLs supposed to work directly? Or do they require special authentication/SAS tokens?

  2. Is there a specific method in the SDK to get authenticated image URLs? We’ve tried:

  • mapData.getById(poiId)

  • mapData.Query.find()

  • mapData.Search.search()

  • Various methods with includeSasTokens, authenticated, signed parameters

  1. Should we be using a different approach? Like:
  • mapView.Images.add(target, url, options) (which works but adds images to the map, not displays them in UI)

  • Special image loading methods we might have missed

  1. Are there any configuration requirements for accessing CDN images that we might have missed?

Additional Context

  • The Mappedin SDK API itself works fine (we can add images to the map using mapView.Images.add())

  • POI data is being retrieved correctly

  • The issue is specifically with displaying images in React Native UI components

  • We’re using the exact URL structure that comes from the POI objects

Code Source

This implementation is based on:

  • Mappedin React Native SDK documentation

  • Standard React Native Image component usage

  • POI object structure from mapData.getByType(‘point-of-interest’)

Please let us know if we’re missing something obvious or if there’s a different approach we should be using to display POI images in our app.

Accessing these image URLs does require a token, which should be automatically added by the Mappedin SDK for React Native.

I wasn’t able to reproduce this behaviour. I’ve published a new example that lists locations and uses their image. You can find it here: react-native/SDKv6_Examples/PlaygroundSamples/app/location-categories.tsx at master · MappedIn/react-native · GitHub

Please compare that to your implementation and let me know if it resolves your issue or if not, can you provide a modified version of that example that reproduces the issue?

I opened your example and it comes with a link to the location without a signature for display https://cdn.mappedin.com/660c0c6e7c0c4fe5b4cc484c/a4b6c89359863774229b8d69571ad28852921c9a.jpeg
But in your example the image opens without a signed url. Maybe some additional settings are needed in the mappedin project?

The status of the map may have some impact on what you are seeing. Is your map public / live or private / draft?

Yes, you are right, images are not available without an signature if the card is marked as a draft. Thank you

Thank you for checking that. Just to confirm, changing the map to live has resolved the issue for you?