ed-gonzalez / Cognos-Custom-Control-Tutorial

Files used in Cognos custom Control Tutorial using Mapbox API
1 stars 2 forks source link

Error using step4a.js #1

Closed gstaniland closed 6 years ago

gstaniland commented 6 years ago

Hi Ed I'm trying to use your code in C11.0.6. I have some success, but get this message popping up: (screenshot attached). The only changes I made is adding a Mapbox key, and changing the center to land on South Africa. The map displays ok, with all the points correctly plotted, but the navigation of the map doesn't work properly. And no navigation tools are displayed. When the report first runs, it runs for aaaagggess, and then I hit cancel. Filtering work well. Any ideas? thanks so much Gill. js message saweatherstations

ed-gonzalez commented 6 years ago

Hi

I'm not sure about the time it takes to load. But a couple of things to try with the controls.

  1. In the properties for the custom control try changing the "With Event Propagation" to true .
  2. Make sure you are getting the MapBox CSS. file it is the one that manages the placement of the controls and the MapBox watermark at the bottom of the map. It should be loaded in the init section as such:

$("head link[rel='stylesheet']").last().after("<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.34.0/mapbox-gl.css https://api.tiles.mapbox.com/mapbox-gl-js/v0.34.0/mapbox-gl.css' rel='stylesheet' />");

Give that a try and let me know what happens. You can contact me directly at edgonzalez@icdata.io edgonzalez@icdata.io

Good Luck

Ed

https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon Virus-free. www.avast.com https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Mon, Oct 23, 2017 at 11:18 AM, gstaniland notifications@github.com wrote:

Hi Ed I'm trying to use your code in C11.0.6. I have some success, but get this message popping up: (screenshot attached). The only changes I made is adding a Mapbox key, and changing the center to land on South Africa. The map displays ok, with all the points correctly plotted, but the navigation of the map doesn't work properly. And no navigation tools are displayed. When the report first runs, it runs for aaaagggess, and then I hit cancel. Filtering work well. Any ideas? thanks so much Gill. [image: js message] https://user-images.githubusercontent.com/28891173/31897253-1c63a992-b816-11e7-8ab1-724872c2774a.JPG [image: saweatherstations] https://user-images.githubusercontent.com/28891173/31897254-1d053a82-b816-11e7-8e91-c637b4033ea1.JPG

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ed-gonzalez/Cognos-Custom-Control-Tutorial/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AKPD0Ib4nyKQAeXgWtRdY1xNM4wqFs4yks5svK4_gaJpZM4QDBSD .

gstaniland commented 6 years ago

Hi Ed

I've got it working! :) After a bit of digging around, I found a problem in my data source! A LngLat that was null. Easy when you know how :)